{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-05-12T12:08:10.948881Z",
     "iopub.status.busy": "2022-05-12T12:08:10.947878Z",
     "iopub.status.idle": "2022-05-12T12:08:13.183982Z",
     "shell.execute_reply": "2022-05-12T12:08:13.182979Z",
     "shell.execute_reply.started": "2022-05-12T12:08:10.948881Z"
    },
    "pycharm": {
     "name": "#%%\n"
    },
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "欢迎使用缠论数据计算工具；\n",
      "项目地址：https://github.com/yijixiuxin/chanlun-pro\n",
      "授权许可有效期：2099-01-01\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "在使用天勤量化之前，默认您已经知晓并同意以下免责条款，如果不同意请立即停止使用：https://www.shinnytech.com/blog/disclaimer/\n"
     ]
    }
   ],
   "source": [
    "from chanlun.backtesting import backtest\n",
    "from chanlun.backtesting.optimize import OptimizationSetting\n",
    "from chanlun.strategy.strategy_a_single_all_mmd import StrategyASingleAllMmd\n",
    "import pandas as pd\n",
    "from chanlun.cl_utils import query_cl_chart_config"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-05-12T12:08:13.805069Z",
     "iopub.status.busy": "2022-05-12T12:08:13.804066Z",
     "iopub.status.idle": "2022-05-12T12:08:13.836065Z",
     "shell.execute_reply": "2022-05-12T12:08:13.835060Z",
     "shell.execute_reply.started": "2022-05-12T12:08:13.805069Z"
    },
    "pycharm": {
     "name": "#%%\n"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "# 量化配置\n",
    "bt_config = {\n",
    "    # 策略结果保存的文件\n",
    "    'save_file': './data/bk/a_strategy_a_single_allmmd_signal.pkl',\n",
    "    # 设置策略对象\n",
    "    'strategy': StrategyASingleAllMmd(),\n",
    "    # 回测模式：signal 信号模式，固定金额开仓； trade 交易模式，按照实际金额开仓\n",
    "    'mode': 'trade',\n",
    "    # 市场配置，currency 数字货币  a 沪深  hk  港股  futures  期货\n",
    "    'market': 'a',\n",
    "    # 基准代码，用于获取回测的时间列表\n",
    "    'base_code': 'SH.000001',\n",
    "    # 回测的标的代码，符合条件股票并按市值排行前100股票\n",
    "    'codes': [\"SH.600519\", \"SH.601398\", \"SH.601939\", \"SH.601288\", \"SH.601857\", \"SH.600036\", \"SH.601988\", \"SH.601318\", \"SZ.002594\", \"SH.601628\", \"SZ.000858\", \"SH.601088\", \"SH.600028\", \"SH.600900\", \"SH.601658\", \"SH.601166\", \"SZ.000333\", \"SZ.300760\", \"SH.601012\", \"SH.601328\", \"SH.603288\", \"SZ.002415\", \"SH.601888\", \"SH.600809\", \"SH.688981\", \"SZ.000568\", \"SZ.000001\", \"SZ.300059\", \"SH.603259\", \"SH.600030\", \"SH.601899\", \"SZ.002714\", \"SH.601668\", \"SH.600309\", \"SH.600690\", \"SH.600887\", \"SZ.002352\", \"SZ.002304\", \"SH.601919\", \"SZ.002142\", \"SH.600000\", \"SH.601998\", \"SH.601633\", \"SZ.000002\", \"SH.601816\", \"SH.600585\", \"SZ.002475\", \"SH.600048\", \"SH.601319\", \"SZ.000651\", \"SH.601601\", \"SZ.300015\", \"SH.600104\", \"SH.601138\", \"SH.600276\", \"SH.600436\", \"SH.600438\", \"SZ.002812\", \"SH.601995\", \"SH.601390\", \"SH.600406\", \"SH.601800\", \"SH.600188\", \"SH.601818\", \"SH.601066\", \"SH.600905\", \"SH.601225\", \"SH.600016\", \"SZ.000792\", \"SZ.300122\", \"SH.600346\", \"SZ.002460\", \"SH.600018\", \"SH.603392\", \"SZ.000725\", \"SH.601766\", \"SZ.003816\", \"SZ.002493\", \"SH.600031\", \"SH.600019\", \"SH.601111\", \"SH.601985\", \"SZ.002459\", \"SH.603501\", \"SH.601211\", \"SH.601238\", \"SZ.002129\", \"SH.601898\", \"SZ.300014\", \"SZ.002371\", \"SZ.002241\", \"SH.601688\", \"SZ.000776\", \"SZ.300498\", \"SZ.002271\", \"SH.600600\", \"SH.600837\", \"SZ.001979\", \"SH.601669\", \"SH.601009\"],\n",
    "    # 回测的周期，这里设置里，在策略中才能取到对应周期的数据\n",
    "    'frequencys': ['d'],\n",
    "    # 回测开始的时间\n",
    "    'start_datetime': '2017-01-01 00:00:00',\n",
    "    # 回测的结束时间\n",
    "    'end_datetime': '2022-04-20 00:00:00',\n",
    "    # 是否是股票，True 当日开仓不可平仓，False 当日开当日可平\n",
    "    'is_stock': True,\n",
    "    # 是否是期货，True 可做空，False 不可做空\n",
    "    'is_futures': False,\n",
    "    # mode 为 trade 生效，初始账户资金\n",
    "    'init_balance': 1000000,\n",
    "    # mode 为 trade 生效，交易手续费率\n",
    "    'fee_rate': 0.0006,\n",
    "    # mode 为 trade 生效，最大持仓数量（分仓）\n",
    "    'max_pos': 10,\n",
    "    # 缠论计算的配置，详见缠论配置说明\n",
    "    'cl_config': query_cl_chart_config('a', 'SH.000001'),\n",
    "}\n",
    "\n",
    "# 参数优化设置\n",
    "setting = OptimizationSetting()\n",
    "setting.add_cl_parameter('bi_type', ['bi_type_old', 'bi_type_new'])\n",
    "setting.add_cl_parameter('bi_bzh', ['bi_bzh_yes', 'bi_bzh_no'])\n",
    "setting.add_cl_parameter('zs_bi_type', ['zs_type_bz', 'zs_type_dn'])\n",
    "setting.add_cl_parameter('zs_xd_type', ['zs_type_bz', 'zs_type_dn'])\n",
    "\n",
    "\n",
    "BT = backtest.BackTest(bt_config)\n",
    "BT.datas.load_data_to_cache = True # 是否将所有k线数据加载到内存中，如果内存吃紧，可以设置为 False，这样每次循环都会从数据库中读取\n",
    "BT.datas.load_kline_nums = 10000 # 每次 klines 方法中返回的k线数据条数\n",
    "BT.datas.cl_data_kline_max_nums = 30000 # 回测过程中，如果缠论对象的数据量超过这个值，则会清空重新计算，cl_data_kline_max_nums 不能小于 load_kline_nums，否则将会不断的删除并重新计算"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "# # 跑参数优化\n",
    "# results = BT.run_optimization(setting)\n",
    "# print(results)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "# # 跑参数优化\n",
    "# results = BT.run_optimization(setting)\n",
    "# print(results)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-05-06T01:16:01.328861Z",
     "iopub.status.busy": "2022-05-06T01:16:01.327861Z",
     "iopub.status.idle": "2022-05-06T01:26:39.761810Z",
     "shell.execute_reply": "2022-05-06T01:26:39.760900Z",
     "shell.execute_reply.started": "2022-05-06T01:16:01.328861Z"
    },
    "pycharm": {
     "name": "#%%\n"
    },
    "scrolled": true,
    "tags": []
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[SZ.002142 - 2017-01-03 00:00:00] // 3buy 做多买入（25.915438 - 3820.1167967911633），原因： 三买\n",
      "[SH.600000 - 2017-01-03 00:00:00] // l3buy 做多买入（116.199244 - 852.8753078634487），原因： 类三买\n",
      "[SZ.000333 - 2017-01-04 00:00:00] // 3buy 做多买入（124.563786 - 796.5395889632762），原因： 三买\n",
      "[SH.600028 - 2017-01-05 00:00:00] // 3buy 做多买入（11.43752 - 8686.613025723726），原因： 三买\n",
      "[SZ.000333 - 2017-01-11 00:00:00] // 3buy 平仓做多（119.427565 - 796.5395889632762） 盈亏：-4091.2033641645394  (-4.12%)，原因： 线段向上背驰，笔不创新高\n",
      "[SZ.002142 - 2017-03-03 00:00:00] // 3buy 平仓做多（27.032483 - 3820.1167967911633） 盈亏：4267.242367271567  (4.31%)，原因： 3买后出现笔背驰 ['pz']\n",
      "[SH.600000 - 2017-03-22 00:00:00] // l3buy 平仓做多（112.492275 - 852.8753078634487） 盈亏：-3161.5823271152476  (-3.19%)，原因： l3buy 止损\n",
      "[SH.600309 - 2017-03-27 00:00:00] // 3buy 做多买入（645.935505 - 152.79717305897935），原因： 三买\n",
      "[SH.600018 - 2017-03-27 00:00:00] // 3buy 做多买入（75.634355 - 1306.4587154905455），原因： 三买\n",
      "[SH.600309 - 2017-03-29 00:00:00] // 3buy 平仓做多（630.709033 - 152.79717305897935） 盈亏：-2326.5618772617163  (-2.36%)，原因： 笔快速上涨，内部macd背驰 macd jd -22.71522431560135 dif jd 29.958539104308937\n",
      "[SH.600309 - 2017-04-05 00:00:00] // 3buy 做多买入（664.968596 - 148.12187840290412），原因： 三买\n",
      "[SH.600346 - 2017-04-06 00:00:00] // 3buy 做多买入（42.961851 - 2295.728564742213），原因： 三买\n",
      "[SH.600346 - 2017-04-18 00:00:00] // 3buy 平仓做多（39.542242 - 2295.728564742213） 盈亏：-7850.494061549558  (-7.96%)，原因： 3buy 止损\n",
      "[SH.603288 - 2017-04-20 00:00:00] // 3buy 做多买入（139.008279 - 701.4142793441316），原因： 三买\n",
      "[SH.600887 - 2017-04-20 00:00:00] // l3buy 做多买入（1174.483062 - 83.14742566058149），原因： 类三买\n",
      "[SZ.002475 - 2017-04-25 00:00:00] // 3buy 做多买入（269.51926 - 363.01284045731234），原因： 三买\n",
      "[SH.600018 - 2017-05-08 00:00:00] // l3buy 做多买入（75.761258 - 1294.4481522005335），原因： 类三买\n",
      "[SH.600887 - 2017-05-09 00:00:00] // l3buy 平仓做多（1112.432337 - 83.14742566058149） 盈亏：-5159.358044122695  (-5.28%)，原因： l3buy 止损\n",
      "[SH.600436 - 2017-05-12 00:00:00] // 3buy 做多买入（279.01201 - 346.44161206768723），原因： 三买\n",
      "[SH.600887 - 2017-05-15 00:00:00] // l3buy 做多买入（1158.43758 - 83.70277157938547），原因： 类三买\n",
      "[SH.601111 - 2017-05-24 00:00:00] // l3buy 做多买入（10.263726 - 9491.724534629899），原因： 类三买\n",
      "[SH.600887 - 2017-06-02 00:00:00] // l3buy 平仓做多（1226.806483 - 83.70277157938547） 盈亏：5722.66667094217  (5.90%)，原因： 3买后出现笔背驰 ['pz']\n",
      "[SH.600018 - 2017-06-13 00:00:00] // 3buy 平仓做多（77.537904 - 1306.4587154905455） 盈亏：2486.9081814133096  (2.52%)，原因： 3买后出现笔背驰 ['bi', 'pz']\n",
      "[SH.600018 - 2017-06-13 00:00:00] // l3buy 平仓做多（77.537904 - 1294.4481522005335） 盈亏：2299.776131814462  (2.35%)，原因： 3买后出现笔背驰 ['bi', 'pz']\n",
      "[SH.601111 - 2017-06-13 00:00:00] // l3buy 平仓做多（11.021967 - 9491.724534629899） 盈亏：7197.014702862303  (7.39%)，原因： 3买后出现笔背驰 ['pz']\n",
      "[SH.600309 - 2017-06-15 00:00:00] // 3buy 平仓做多（724.292474 - 148.12187840290412） 盈亏：8787.16424350471  (8.92%)，原因： 笔快速上涨，内部macd背驰 macd jd -1.7456289784462509 dif jd 28.919892909888574\n",
      "[SH.601111 - 2017-06-26 00:00:00] // l3buy 做多买入（11.010978 - 9219.95872675747），原因： 类三买\n",
      "[SZ.002475 - 2017-06-28 00:00:00] // 3buy 平仓做多（293.04389 - 363.01284045731234） 盈亏：8539.742757007305  (8.73%)，原因： 笔快速上涨，内部macd背驰 macd jd -0.5416587694610735 dif jd 1.4413707897770174\n",
      "[SH.601398 - 2017-06-30 00:00:00] // 3buy 做多买入（8.17792 - 12509.50601933951），原因： 三买\n",
      "[SH.601318 - 2017-07-06 00:00:00] // 3buy 做多买入（115.098543 - 890.4907640573676），原因： 三买\n",
      "[SH.601111 - 2017-07-10 00:00:00] // l3buy 平仓做多（10.168953 - 9219.95872675747） 盈亏：-7763.435746897943  (-7.65%)，原因： l3buy 止损\n",
      "[SH.601111 - 2017-07-18 00:00:00] // l3buy 做多买入（10.446793 - 9643.244202710617），原因： 类三买\n",
      "[SZ.300015 - 2017-07-21 00:00:00] // l3buy 做多买入（254.878937 - 396.17972998416974），原因： 类三买\n",
      "[SH.601111 - 2017-07-25 00:00:00] // l3buy 平仓做多（9.91334 - 9643.244202710617） 盈亏：-5144.217549668581  (-5.11%)，原因： l3buy 止损\n",
      "[SH.600436 - 2017-08-04 00:00:00] // 3buy 平仓做多（274.706816 - 346.44161206768723） 盈亏：-1491.498349624133  (-1.54%)，原因： 线段向上背驰，笔不创新高\n",
      "[SH.600188 - 2017-08-21 00:00:00] // 3buy 做多买入（27.015936 - 3646.9515779777316），原因： 三买\n",
      "[SZ.300015 - 2017-08-24 00:00:00] // l3buy 平仓做多（250.49996 - 396.17972998416974） 盈亏：-1734.8619254668884  (-1.72%)，原因： 小转大验证分型\n",
      "[SZ.300015 - 2017-08-28 00:00:00] // l3buy 做多买入（256.450877 - 384.6519125599901），原因： 类三买\n",
      "[SH.600018 - 2017-08-30 00:00:00] // 3buy 做多买入（84.635169 - 1168.2647249745457），原因： 三买\n",
      "[SH.600028 - 2017-08-31 00:00:00] // 3buy 平仓做多（12.287313 - 8686.613025723726） 盈亏：7381.822942968836  (7.43%)，原因： 线段向上背驰，笔不创新高\n",
      "[SH.601318 - 2017-09-04 00:00:00] // 3buy 平仓做多（125.984439 - 890.4907640573676） 盈亏：9693.789846489031  (9.46%)，原因： 3买后出现笔背驰 ['pz']\n",
      "[SH.600030 - 2017-09-18 00:00:00] // 3buy 做多买入（71.650662 - 1435.1932119343558），原因： 三买\n",
      "[SH.600188 - 2017-09-27 00:00:00] // l3buy 做多买入（27.796865 - 3708.1287569512256），原因： 类三买\n",
      "[SH.600188 - 2017-10-12 00:00:00] // l3buy 平仓做多（26.488281 - 3708.1287569512256） 盈亏：-4852.39796128626  (-4.71%)，原因： l3buy 止损\n",
      "[SH.600188 - 2017-10-19 00:00:00] // 3buy 平仓做多（25.221909 - 3646.9515779777316） 盈亏：-6542.729598584658  (-6.64%)，原因： 3buy 止损\n",
      "[SH.601111 - 2017-10-20 00:00:00] // l3buy 做多买入（9.868886 - 10100.077879445755），原因： 类三买\n",
      "[SH.600030 - 2017-10-23 00:00:00] // 3buy 平仓做多（68.532026 - 1435.1932119343558） 盈亏：-4475.845217694092  (-4.35%)，原因： 3buy 止损\n",
      "[SH.603288 - 2017-10-25 00:00:00] // 3buy 平仓做多（187.084619 - 701.4142793441316） 盈亏：33721.431374603446  (34.59%)，原因： 线段中枢上方出现卖点 ['1sell']\n",
      "[SZ.002241 - 2017-11-13 00:00:00] // l3buy 做多买入（511.539706 - 204.2174388363438），原因： 类三买\n",
      "[SH.600436 - 2017-11-21 00:00:00] // 3buy 做多买入（343.585066 - 304.61699053771105），原因： 三买\n",
      "[SH.600436 - 2017-11-24 00:00:00] // 3buy 平仓做多（320.407308 - 304.61699053771105） 盈亏：-7060.338889371356  (-6.75%)，原因： 3buy 止损\n",
      "[SH.601111 - 2017-11-27 00:00:00] // l3buy 平仓做多（11.813767 - 10100.077879445755） 盈亏：19643.44956625435  (19.71%)，原因： 3买后出现笔背驰 ['bi', 'pz']\n",
      "[SZ.002241 - 2017-11-28 00:00:00] // l3buy 平仓做多（451.635714 - 204.2174388363438） 盈亏：-12233.439822312837  (-11.71%)，原因： l3buy 止损\n",
      "[SH.601888 - 2017-11-30 00:00:00] // 3buy 做多买入（89.199174 - 1161.94227674541），原因： 三买\n",
      "[SH.601628 - 2017-12-05 00:00:00] // 3buy 做多买入（37.881385 - 2740.310868308135），原因： 三买\n",
      "[SH.601628 - 2017-12-14 00:00:00] // 3buy 平仓做多（35.468933 - 2740.310868308135） 盈亏：-6610.868434871707  (-6.37%)，原因： 3buy 止损\n",
      "[SH.601888 - 2017-12-14 00:00:00] // 3buy 平仓做多（92.301567 - 1161.94227674541） 盈亏：3604.8015857790306  (3.48%)，原因： 线段向上背驰，笔不创新高\n",
      "[SH.601628 - 2017-12-19 00:00:00] // 3buy 做多买入（37.045853 - 2785.3102817921826），原因： 三买\n",
      "[SH.601888 - 2017-12-20 00:00:00] // l3buy 做多买入（93.307171 - 1107.5885441012417），原因： 类三买\n",
      "[SH.601628 - 2017-12-27 00:00:00] // 3buy 平仓做多（36.080872 - 2785.3102817921826） 盈亏：-2687.77150103412  (-2.60%)，原因： 线段向上背驰，笔不创新高\n",
      "[SH.601888 - 2017-12-27 00:00:00] // l3buy 平仓做多（88.214966 - 1107.5885441012417） 盈亏：-5640.06792221505  (-5.46%)，原因： l3buy 止损\n",
      "[SZ.300122 - 2018-01-02 00:00:00] // l3buy 做多买入（118.724413 - 858.8971198863608），原因： 类三买\n",
      "[SH.601888 - 2018-01-03 00:00:00] // l3buy 做多买入（97.736106 - 1044.976301589368），原因： 类三买\n",
      "[SZ.002129 - 2018-01-04 00:00:00] // 3buy 做多买入（50.419849 - 2029.4397378566844），原因： 三买\n",
      "[SZ.002129 - 2018-01-10 00:00:00] // 3buy 平仓做多（45.30236 - 2029.4397378566844） 盈亏：-10385.635534644462  (-10.15%)，原因： 3buy 止损\n",
      "[SZ.002493 - 2018-01-24 00:00:00] // 3buy 做多买入（97.960052 - 1023.3213322697184），原因： 三买\n",
      "[SZ.002129 - 2018-01-24 00:00:00] // 3buy 做多买入（45.386254 - 2213.8935750113596），原因： 三买\n",
      "[SH.600031 - 2018-01-25 00:00:00] // 3buy 做多买入（320.30812 - 314.6825483900598），原因： 三买\n",
      "[SH.600028 - 2018-01-26 00:00:00] // 3buy 做多买入（15.346164 - 6599.005205631333），原因： 三买\n",
      "[SZ.002129 - 2018-01-31 00:00:00] // 3buy 平仓做多（39.765405 - 2213.8935750113596） 盈亏：-12443.961487209031  (-12.38%)，原因： 3buy 止损\n",
      "[SZ.000001 - 2018-02-05 00:00:00] // l3buy 做多买入（1670.921491 - 56.65307273698773），原因： 类三买\n",
      "[SH.601998 - 2018-02-05 00:00:00] // 3buy 做多买入（11.019615 - 8671.195446488224），原因： 三买\n",
      "[SZ.300122 - 2018-02-05 00:00:00] // l3buy 平仓做多（106.227106 - 858.8971198863608） 盈亏：-10733.90098863565  (-10.53%)，原因： l3buy 止损\n",
      "[SH.601888 - 2018-02-07 00:00:00] // l3buy 平仓做多（100.731521 - 1044.976301589368） 盈亏：3130.1376884253114  (3.06%)，原因： 线段中枢上方出现卖点 ['1sell']\n",
      "[SZ.000001 - 2018-02-07 00:00:00] // l3buy 平仓做多（1483.732348 - 56.65307273698773） 盈亏：-10604.840133953403  (-11.20%)，原因： l3buy 止损\n",
      "[SH.600031 - 2018-02-07 00:00:00] // 3buy 平仓做多（289.257843 - 314.6825483900598） 盈亏：-9770.980294577268  (-9.69%)，原因： 3buy 止损\n",
      "[SH.600028 - 2018-02-08 00:00:00] // 3buy 平仓做多（13.973743 - 6599.005205631333） 盈亏：-9056.613323317753  (-8.94%)，原因： 3buy 止损\n",
      "[SH.601998 - 2018-02-09 00:00:00] // 3buy 平仓做多（9.340951 - 8671.195446488224） 盈亏：-14556.023632983706  (-15.23%)，原因： 3buy 止损\n",
      "[SZ.002493 - 2018-02-09 00:00:00] // 3buy 平仓做多（88.351067 - 1023.3213322697184） 盈亏：-9833.079331959743  (-9.81%)，原因： 线段向上背驰，笔不创新高\n",
      "[SZ.002493 - 2018-02-26 00:00:00] // 3buy 做多买入（110.277609 - 815.3106540619988），原因： 三买\n",
      "[SZ.300015 - 2018-03-29 00:00:00] // l3buy 平仓做多（449.238161 - 384.6519125599901） 盈亏：74155.99750784597  (75.18%)，原因： 笔快速上涨，内部macd背驰 macd jd -38.628999066292344 dif jd 40.632167254819706\n",
      "[SH.600018 - 2018-06-15 00:00:00] // 3buy 平仓做多（81.12496 - 1168.2647249745457） 盈亏：-4100.853351988189  (-4.15%)，原因： 3buy 止损\n",
      "[SZ.002493 - 2018-07-27 00:00:00] // 3buy 平仓做多（110.555894 - 815.3106540619988） 盈亏：226.88872536564304  (0.25%)，原因： 3买后出现笔背驰 ['bi', 'pz']\n",
      "[SH.600837 - 2018-08-28 00:00:00] // 1buy 做多买入（149.549038 - 664.3917231572832），原因： 一买\n",
      "[SH.600837 - 2018-09-10 00:00:00] // 1buy 平仓做多（141.66902 - 664.3917231572832） 盈亏：-5235.418737530403  (-5.27%)，原因： 1buy 止损\n",
      "[SH.601211 - 2018-10-22 00:00:00] // 1buy 做多买入（16.640347 - 5935.602011361862），原因： 一买\n",
      "[SZ.000725 - 2018-11-01 00:00:00] // 2buy 做多买入（9.567335 - 10335.857008397494），原因： 二买\n",
      "[SH.601211 - 2018-11-13 00:00:00] // 2buy 做多买入（16.890007 - 5862.607508526897），原因： 二买\n",
      "[SZ.000776 - 2018-11-13 00:00:00] // 2buy 做多买入（70.967492 - 1397.4667640548737），原因： 二买\n",
      "[SH.600837 - 2018-11-15 00:00:00] // 2buy 做多买入（164.966465 - 602.3119842291138），原因： 二买\n",
      "[SH.601818 - 2018-11-19 00:00:00] // l3buy 做多买入（5.389362 - 18479.91040732923），原因： 类三买\n",
      "[SH.600837 - 2018-12-06 00:00:00] // 2buy 平仓做多（162.910808 - 602.3119842291138） 盈亏：-1238.146846564472  (-1.25%)，原因： 线段出现三卖，并且次笔不创新高\n",
      "[SH.601818 - 2018-12-18 00:00:00] // l3buy 平仓做多（5.197375 - 18479.91040732923） 盈亏：-3547.9025593719125  (-3.56%)，原因： l3buy 止损\n",
      "[SZ.000725 - 2018-12-21 00:00:00] // 2buy 平仓做多（8.820947 - 10335.857008397494） 盈亏：-7714.5596407837875  (-7.80%)，原因： 2buy 止损\n",
      "[SZ.000776 - 2018-12-25 00:00:00] // 2buy 平仓做多（67.238051 - 1397.4667640548737） 盈亏：-5211.769846003561  (-5.26%)，原因： 2buy 止损\n",
      "[SZ.002352 - 2019-02-14 00:00:00] // 1buy 做多买入（120.19142 - 802.3015723129647），原因： 一买\n",
      "[SZ.000792 - 2019-03-20 00:00:00] // down_pz_bc_buy 做多买入（47.759111 - 2022.2515233413003），原因： 线段背驰\n",
      "[SZ.000792 - 2019-03-26 00:00:00] // down_pz_bc_buy 平仓做多（43.275857 - 2022.2515233413003） 盈亏：-9066.267231025966  (-9.39%)，原因： down_pz_bc_buy 止损\n",
      "[SZ.000792 - 2019-04-01 00:00:00] // down_pz_bc_buy 做多买入（43.898531 - 2165.602657988445），原因： 线段背驰\n",
      "[SZ.002352 - 2019-04-12 00:00:00] // 1buy 平仓做多（120.19142 - 802.3015723129647） 盈亏：0.0  (0.00%)，原因： 小转大验证分型\n",
      "[SH.601398 - 2019-05-31 00:00:00] // 3buy 平仓做多（9.545426 - 12509.50601933951） 盈亏：17106.824538482906  (16.72%)，原因： 线段向上背驰，笔不创新高\n",
      "[SZ.000792 - 2019-06-17 00:00:00] // down_pz_bc_buy 平仓做多（39.975684 - 2165.602657988445） 盈亏：-8495.327890082  (-8.94%)，原因： down_pz_bc_buy 止损\n",
      "[SZ.002371 - 2019-06-21 00:00:00] // l3buy 做多买入（318.438394 - 304.38938008734124），原因： 类三买\n",
      "[SZ.001979 - 2019-06-21 00:00:00] // l3buy 做多买入（22.801563 - 4256.704269975583），原因： 类三买\n",
      "[SH.600031 - 2019-07-12 00:00:00] // l3buy 做多买入（436.836676 - 222.53549869893052），原因： 类三买\n",
      "[SZ.000333 - 2019-07-24 00:00:00] // 3buy 做多买入（240.912641 - 404.27327403142056），原因： 三买\n",
      "[SH.600690 - 2019-07-25 00:00:00] // l3buy 做多买入（569.292901 - 171.48214078722737），原因： 类三买\n",
      "[SZ.000858 - 2019-07-29 00:00:00] // 3buy 做多买入（1832.190896 - 53.44947845279748），原因： 三买\n",
      "[SH.600809 - 2019-07-29 00:00:00] // 3buy 做多买入（227.622451 - 432.25178587874814），原因： 三买\n",
      "[SH.600809 - 2019-08-01 00:00:00] // 3buy 平仓做多（218.565941 - 432.25178587874814） 盈亏：-3914.692621328737  (-3.98%)，原因： 线段向上背驰，笔不创新高\n",
      "[SH.600690 - 2019-08-02 00:00:00] // l3buy 平仓做多（542.151803 - 171.48214078722737） 盈亏：-4654.213588355953  (-4.77%)，原因： l3buy 止损\n",
      "[SH.600031 - 2019-08-02 00:00:00] // l3buy 平仓做多（472.609197 - 222.53549869893052） 盈亏：7960.655800452965  (8.19%)，原因： 线段中枢上方出现卖点 ['1sell']\n",
      "[SZ.001979 - 2019-08-02 00:00:00] // l3buy 平仓做多（22.005879 - 4256.704269975583） 盈亏：-3386.991480351251  (-3.49%)，原因： l3buy 止损\n",
      "[SZ.000333 - 2019-08-05 00:00:00] // 3buy 平仓做多（232.879211 - 404.27327403142056） 盈亏：-3247.701047802242  (-3.33%)，原因： 3buy 止损\n",
      "[SZ.002371 - 2019-08-06 00:00:00] // l3buy 平仓做多（279.998306 - 304.38938008734124） 盈亏：-11700.754556822838  (-12.07%)，原因： l3buy 止损\n",
      "[SH.601390 - 2019-12-09 00:00:00] // 2buy 做多买入（6.62727 - 14205.118247211794），原因： 二买\n",
      "[SH.601939 - 2019-12-31 00:00:00] // l3buy 做多买入（12.777239 - 7379.429621320879），原因： 类三买\n",
      "[SH.600809 - 2019-12-31 00:00:00] // 3buy 做多买入（296.404949 - 318.7062572473291），原因： 三买\n",
      "[SZ.002812 - 2019-12-31 00:00:00] // 3buy 做多买入（176.144 - 537.5615915817058），原因： 三买\n",
      "[SH.601398 - 2020-01-02 00:00:00] // 3buy 做多买入（10.60506 - 8956.585649764706），原因： 三买\n",
      "[SH.601818 - 2020-01-02 00:00:00] // 3buy 做多买入（6.35541 - 15015.84370935463），原因： 三买\n",
      "[SH.601818 - 2020-01-10 00:00:00] // 3buy 平仓做多（6.112619 - 15015.84370935463） 盈亏：-3645.7117100379255  (-3.82%)，原因： 3buy 止损\n",
      "[SZ.002493 - 2020-01-14 00:00:00] // 3buy 做多买入（119.86633 - 780.6329953864183），原因： 三买\n",
      "[SH.601398 - 2020-01-16 00:00:00] // 3buy 平仓做多（10.303074 - 8956.585649764706） 盈亏：-2704.763474029838  (-2.85%)，原因： 3buy 止损\n",
      "[SZ.000858 - 2020-01-20 00:00:00] // 3buy 平仓做多（2036.655997 - 53.44947845279748） 盈亏：10928.55301024855  (11.16%)，原因： 3买后出现笔背驰 ['pz']\n",
      "[SH.601939 - 2020-01-21 00:00:00] // l3buy 平仓做多（12.441461 - 7379.429621320879） 盈亏：-2477.8501193878765  (-2.63%)，原因： l3buy 止损\n",
      "[SH.600809 - 2020-01-21 00:00:00] // 3buy 平仓做多（312.266083 - 318.7062572473291） 盈亏：5055.042652838369  (5.35%)，原因： 线段向上背驰，笔不创新高\n",
      "[SZ.002493 - 2020-01-23 00:00:00] // 3buy 平仓做多（113.081444 - 780.6329953864183） 盈亏：-5296.505881535384  (-5.66%)，原因： 3buy 止损\n",
      "[SH.601390 - 2020-02-03 00:00:00] // 2buy 平仓做多（5.813395 - 14205.118247211794） 盈亏：-11561.190613449508  (-12.28%)，原因： 2buy 止损\n",
      "[SH.601899 - 2020-02-06 00:00:00] // 3buy 做多买入（8.037298 - 11585.442028854968），原因： 三买\n",
      "[SH.601985 - 2020-03-05 00:00:00] // down_pz_bc_buy 做多买入（5.245229 - 17780.276961855554），原因： 线段背驰\n",
      "[SH.601899 - 2020-03-13 00:00:00] // 3buy 平仓做多（7.472936 - 11585.442028854968） 盈亏：-6538.383234288645  (-7.02%)，原因： 3buy 止损\n",
      "[SH.601985 - 2020-03-13 00:00:00] // down_pz_bc_buy 平仓做多（4.87057 - 17780.276961855554） 盈亏：-6661.540786251848  (-7.14%)，原因： down_pz_bc_buy 止损\n",
      "[SZ.000792 - 2020-04-03 00:00:00] // down_pz_bc_buy 做多买入（58.40684 - 1561.7741496078554），原因： 线段背驰\n",
      "[SH.601669 - 2020-05-06 00:00:00] // 1buy 做多买入（4.392338 - 20800.15079654803），原因： 一买\n",
      "[SZ.002460 - 2020-05-08 00:00:00] // 3buy 做多买入（472.871732 - 193.56868981402417），原因： 三买\n",
      "[SZ.002142 - 2020-05-21 00:00:00] // 3buy 做多买入（53.135386 - 1726.6911704163044），原因： 三买\n",
      "[SZ.002714 - 2020-05-25 00:00:00] // l3buy 做多买入（907.351003 - 101.43380385444961），原因： 类三买\n",
      "[SZ.300059 - 2020-06-01 00:00:00] // l3buy 做多买入（717.615503 - 128.855785425888），原因： 类三买\n",
      "[SH.600436 - 2020-06-01 00:00:00] // 3buy 做多买入（755.288808 - 123.58010716541582），原因： 三买\n",
      "[SZ.002714 - 2020-06-12 00:00:00] // l3buy 平仓做多（864.421261 - 101.43380385444961） 盈亏：-4354.527029550125  (-4.73%)，原因： 小转大验证分型\n",
      "[SZ.002812 - 2020-06-12 00:00:00] // 3buy 平仓做多（216.362908 - 537.5615915817058） 盈亏：21620.1401961582  (22.83%)，原因： 笔快速上涨，内部macd背驰 macd jd -3.7622103155489826 dif jd 4.4394736613960655\n",
      "[SH.600600 - 2020-06-19 00:00:00] // 3buy 做多买入（98.611568 - 1027.8043651671214），原因： 三买\n",
      "[SZ.002142 - 2020-06-24 00:00:00] // l3buy 做多买入（53.690594 - 1905.4870230567878），原因： 类三买\n",
      "[SZ.002142 - 2020-07-13 00:00:00] // 3buy 平仓做多（62.296902 - 1726.6911704163044） 盈亏：15819.10878482771  (17.24%)，原因： 3买后出现笔背驰 ['pz']\n",
      "[SZ.002142 - 2020-07-13 00:00:00] // l3buy 平仓做多（62.296902 - 1905.4870230567878） 盈亏：16399.20821042983  (16.03%)，原因： 3买后出现笔背驰 ['pz']\n",
      "[SZ.002493 - 2020-07-13 00:00:00] // 3buy 做多买入（163.839479 - 686.1551517463264），原因： 三买\n",
      "[SZ.002460 - 2020-07-15 00:00:00] // 3buy 平仓做多（608.045984 - 193.56868981402417） 盈亏：26165.502856230727  (28.59%)，原因： 笔快速上涨，内部macd背驰 macd jd -2.2892046256040803 dif jd 21.211741870570297\n",
      "[SH.600000 - 2020-07-20 00:00:00] // 3buy 做多买入（112.661729 - 1020.4373987260385），原因： 三买\n",
      "[SH.601899 - 2020-07-21 00:00:00] // 3buy 做多买入（11.260719 - 10305.345096876075），原因： 三买\n",
      "[SH.600000 - 2020-07-24 00:00:00] // 3buy 平仓做多（107.452426 - 1020.4373987260385） 盈亏：-5315.767602495733  (-4.62%)，原因： 3buy 止损\n",
      "[SZ.002493 - 2020-07-27 00:00:00] // 3buy 平仓做多（161.554271 - 686.1551517463264） 盈亏：-1568.007242011925  (-1.39%)，原因： 笔快速上涨，内部macd背驰 macd jd -26.62164696115866 dif jd 16.41322343884593\n",
      "[SH.600690 - 2020-07-29 00:00:00] // l3buy 做多买入（629.713008 - 174.09146463123582），原因： 类三买\n",
      "[SZ.000776 - 2020-07-29 00:00:00] // 3buy 做多买入（85.77991 - 1290.031869102041），原因： 三买\n",
      "[SH.600600 - 2020-08-07 00:00:00] // 3buy 平仓做多（108.762515 - 1027.8043651671214） 盈亏：10433.18763718009  (10.29%)，原因： 笔快速上涨，内部macd背驰 macd jd -8.058304856728826 dif jd 5.321574410626717\n",
      "[SZ.002493 - 2020-08-10 00:00:00] // 3buy 做多买入（188.87741 - 591.0880364795904），原因： 三买\n",
      "[SZ.002493 - 2020-09-24 00:00:00] // 3buy 平仓做多（183.81021 - 591.0880364795904） 盈亏：-2995.161298449384  (-2.68%)，原因： 线段向上背驰，笔不创新高\n",
      "[SZ.300760 - 2020-09-25 00:00:00] // l3buy 做多买入（334.12071 - 324.87394977052213），原因： 类三买\n",
      "[SH.600690 - 2020-09-25 00:00:00] // l3buy 平仓做多（751.807363 - 174.09146463123582） 盈亏：21255.585085156054  (19.39%)，原因： 线段中枢上方出现卖点 ['2sell']\n",
      "[SZ.300122 - 2020-09-25 00:00:00] // 3buy 做多买入（595.617399 - 219.13003587338073），原因： 三买\n",
      "[SH.601669 - 2020-10-22 00:00:00] // 1buy 平仓做多（4.700229 - 20800.15079654803） 盈亏：6404.179228899971  (7.01%)，原因： 线段出现三卖，并且次笔不创新高\n",
      "[SH.600028 - 2020-10-23 00:00:00] // 1buy 做多买入（10.068716 - 9728.886354231563），原因： 一买\n",
      "[SZ.300059 - 2020-10-23 00:00:00] // l3buy 平仓做多（1170.772961 - 128.855785425888） 盈亏：58391.96017218883  (63.15%)，原因： 线段向上背驰，笔不创新高\n",
      "[SZ.000776 - 2020-10-29 00:00:00] // l3buy 做多买入（89.021914 - 1687.0456934824042），原因： 类三买\n",
      "[SZ.000776 - 2020-10-30 00:00:00] // l3buy 平仓做多（86.331076 - 1687.0456934824042） 盈亏：-4539.566659758799  (-3.02%)，原因： l3buy 止损\n",
      "[SH.600900 - 2020-11-02 00:00:00] // 3buy 做多买入（53.671291 - 2711.210049208025），原因： 三买\n",
      "[SZ.300760 - 2020-11-06 00:00:00] // l3buy 平仓做多（379.024508 - 324.87394977052213） 盈亏：14588.074215957691  (13.44%)，原因： 线段中枢上方出现卖点 ['2sell']\n",
      "[SZ.300059 - 2020-11-06 00:00:00] // l3buy 做多买入（1171.237738 - 105.18735592148876），原因： 类三买\n",
      "[SZ.000776 - 2020-11-12 00:00:00] // 3buy 平仓做多（95.412656 - 1290.031869102041） 盈亏：12426.549326965207  (11.23%)，原因： 3买后出现笔背驰 ['pz']\n",
      "[SH.600900 - 2020-11-16 00:00:00] // 3buy 平仓做多（54.186579 - 2711.210049208025） 盈亏：1397.0540038363251  (0.96%)，原因： 线段向上背驰，笔不创新高\n",
      "[SZ.000001 - 2020-11-18 00:00:00] // 3buy 做多买入（2214.467452 - 60.57777778364101），原因： 三买\n",
      "[SZ.300760 - 2020-11-20 00:00:00] // l3buy 做多买入（350.83687 - 385.96088479326244），原因： 类三买\n",
      "[SZ.300760 - 2020-11-25 00:00:00] // l3buy 平仓做多（328.066038 - 385.96088479326244） 盈亏：-8788.650466198727  (-6.49%)，原因： l3buy 止损\n",
      "[SH.600900 - 2020-11-27 00:00:00] // l3buy 做多买入（55.081553 - 2297.555027203539），原因： 类三买\n",
      "[SH.600900 - 2020-12-22 00:00:00] // l3buy 平仓做多（51.935585 - 2297.555027203539） 盈亏：-7228.03459382146  (-5.71%)，原因： l3buy 止损\n",
      "[SH.600406 - 2020-12-22 00:00:00] // 3buy 做多买入（574.42754 - 207.59988868566447），原因： 三买\n",
      "[SH.600436 - 2020-12-23 00:00:00] // 3buy 平仓做多（1250.889673 - 123.58010716541582） 盈亏：61246.40800797277  (65.62%)，原因： 小转大验证分型\n",
      "[SZ.300122 - 2020-12-29 00:00:00] // 3buy 平仓做多（609.562041 - 219.13003587338073） 盈亏：3055.689901701451  (2.34%)，原因： 小转大验证分型\n",
      "[SZ.000858 - 2020-12-31 00:00:00] // 3buy 做多买入（4379.197576 - 32.680342933105244），原因： 三买\n",
      "[SZ.000001 - 2020-12-31 00:00:00] // 3buy 平仓做多（1929.887407 - 60.57777778364101） 盈亏：-17239.22672766856  (-12.85%)，原因： 3buy 止损\n",
      "[SH.601601 - 2020-12-31 00:00:00] // l3buy 做多买入（51.163853 - 2542.122559409787），原因： 类三买\n",
      "[SH.601857 - 2021-01-04 00:00:00] // down_pz_bc_buy 做多买入（5.834617 - 22501.59253036651），原因： 线段背驰\n",
      "[SZ.300059 - 2021-01-15 00:00:00] // l3buy 平仓做多（1675.055876 - 105.18735592148876） 盈亏：52995.29780150771  (43.02%)，原因： 3买后出现笔背驰 ['pz']\n",
      "[SZ.300122 - 2021-01-22 00:00:00] // l3buy 做多买入（690.912812 - 254.10295698432216），原因： 类三买\n",
      "[SH.601857 - 2021-01-29 00:00:00] // down_pz_bc_buy 平仓做多（5.695366 - 22501.59253036651） 盈亏：-3133.369261446045  (-2.39%)，原因： down_pz_bc_buy 止损\n",
      "[SH.600019 - 2021-02-08 00:00:00] // 3buy 做多买入（14.579966 - 8809.929907172136），原因： 三买\n",
      "[SZ.300122 - 2021-02-19 00:00:00] // l3buy 平仓做多（768.851148 - 254.10295698432216） 盈亏：19804.36164003762  (11.28%)，原因： 线段中枢上方出现卖点 ['1sell']\n",
      "[SZ.000858 - 2021-02-22 00:00:00] // 3buy 平仓做多（4697.452778 - 32.680342933105244） 盈亏：10400.6891416047  (7.27%)，原因： 线段中枢上方出现卖点 ['1sell']\n",
      "[SZ.002129 - 2021-02-22 00:00:00] // 3buy 做多买入（121.468002 - 1425.8646131113744），原因： 三买\n",
      "[SZ.000725 - 2021-02-23 00:00:00] // 3buy 做多买入（22.404813 - 7803.056243319719），原因： 三买\n",
      "[SH.601899 - 2021-02-24 00:00:00] // 3buy 平仓做多（25.971025 - 10305.345096876075） 盈亏：151594.77981064672  (130.63%)，原因： 3买后出现笔背驰 ['bi', 'pz']\n",
      "[SZ.300122 - 2021-03-01 00:00:00] // l3buy 做多买入（783.638367 - 340.01577479734914），原因： 类三买\n",
      "[SZ.002129 - 2021-03-08 00:00:00] // 3buy 平仓做多（105.455351 - 1425.8646131113744） 盈亏：-22831.872423002467  (-13.18%)，原因： 3buy 止损\n",
      "[SZ.300122 - 2021-03-09 00:00:00] // l3buy 平仓做多（622.57985 - 340.01577479734914） 盈亏：-54762.43644546706  (-20.55%)，原因： l3buy 止损\n",
      "[SH.601111 - 2021-03-11 00:00:00] // 3buy 做多买入（9.598351 - 18790.866645098416），原因： 三买\n",
      "[SZ.300122 - 2021-03-12 00:00:00] // l3buy 做多买入（714.673472 - 254.74264750405496），原因： 类三买\n",
      "[SH.601111 - 2021-03-24 00:00:00] // 3buy 平仓做多（9.735798 - 18790.866645098416） 盈亏：2582.7482477688754  (1.43%)，原因： 3买后出现笔背驰 ['bi', 'pz']\n",
      "[SH.601816 - 2021-04-06 00:00:00] // 2buy 做多买入（5.946752 - 30725.748792112292），原因： 二买\n",
      "[SZ.300122 - 2021-04-12 00:00:00] // l3buy 平仓做多（742.309985 - 254.74264750405496） 盈亏：7040.198489400238  (3.87%)，原因： 线段中枢上方出现卖点 ['2sell']\n",
      "[SH.601601 - 2021-04-13 00:00:00] // l3buy 平仓做多（46.074115 - 2542.122559409787） 盈亏：-12938.737791285268  (-9.95%)，原因： l3buy 止损\n",
      "[SH.600406 - 2021-04-16 00:00:00] // 3buy 平仓做多（704.046741 - 207.59988868566447） 盈亏：26908.931699124776  (22.56%)，原因： 小转大验证分型\n",
      "[SH.601111 - 2021-04-19 00:00:00] // 3buy 做多买入（10.68647 - 14014.923400822589），原因： 三买\n",
      "[SH.601111 - 2021-04-22 00:00:00] // 3buy 平仓做多（10.228315 - 14014.923400822589） 盈亏：-6421.0072307038645  (-4.29%)，原因： 3买后出现笔背驰 ['bi', 'pz']\n",
      "[SZ.300498 - 2021-05-14 00:00:00] // 1buy 做多买入（28.392229 - 5198.362147097778），原因： 一买\n",
      "[SZ.000725 - 2021-05-18 00:00:00] // l3buy 做多买入（22.679719 - 6538.318168782091），原因： 类三买\n",
      "[SH.600188 - 2021-05-27 00:00:00] // l3buy 做多买入（36.312846 - 4122.012589721295），原因： 类三买\n",
      "[SZ.000725 - 2021-05-28 00:00:00] // 3buy 平仓做多（21.648822 - 7803.056243319719） 盈亏：-5899.040292443533  (-3.37%)，原因： 线段中枢上方出现卖点 ['2sell']\n",
      "[SZ.000725 - 2021-05-28 00:00:00] // l3buy 平仓做多（21.648822 - 6538.318168782091） 盈亏：-6740.332585242955  (-4.55%)，原因： l3buy 止损\n",
      "[SH.600188 - 2021-06-21 00:00:00] // l3buy 平仓做多（39.49629 - 4122.012589721295） 盈亏：13122.196246672742  (8.77%)，原因： 3买后出现笔背驰 ['pz']\n",
      "[SH.601816 - 2021-06-22 00:00:00] // 2buy 平仓做多（5.43271 - 30725.748792112292） 盈亏：-15794.325360594987  (-8.64%)，原因： 2buy 止损\n",
      "[SZ.300498 - 2021-06-23 00:00:00] // 2buy 做多买入（28.352041 - 5597.725368629592），原因： 二买\n",
      "[SZ.300498 - 2021-07-19 00:00:00] // 1buy 平仓做多（26.087462 - 5198.362147097778） 盈亏：-11981.013530680124  (-8.12%)，原因： 1buy 止损\n",
      "[SZ.300498 - 2021-07-19 00:00:00] // 2buy 平仓做多（26.087462 - 5597.725368629592） 盈亏：-12676.491317565844  (-7.99%)，原因： 2buy 止损\n",
      "[SZ.300498 - 2021-07-26 00:00:00] // 1buy 做多买入（26.556221 - 5695.632800108178），原因： 一买\n",
      "[SZ.300498 - 2021-07-28 00:00:00] // 1buy 平仓做多（25.068421 - 5695.632800108178） 盈亏：-8473.962480000948  (-5.60%)，原因： 1buy 止损\n",
      "[SZ.300498 - 2021-08-09 00:00:00] // 1buy 做多买入（28.023641 - 5336.2697390026615），原因： 一买\n",
      "[SZ.300498 - 2021-08-24 00:00:00] // 2buy 做多买入（27.514121 - 5447.870014456617），原因： 二买\n",
      "[SZ.000792 - 2021-10-15 00:00:00] // 3buy 做多买入（192.655397 - 780.4781114005687），原因： 三买\n",
      "[SZ.000792 - 2021-11-05 00:00:00] // 3buy 平仓做多（166.876686 - 780.4781114005687） 盈亏：-20119.719675621047  (-13.38%)，原因： 3buy 止损\n",
      "[SH.600016 - 2021-11-15 00:00:00] // 1buy 做多买入（86.776 - 1655.6219777167476），原因： 一买\n",
      "[SH.600016 - 2022-02-08 00:00:00] // 2buy 做多买入（88.100824 - 1638.3947161603953），原因： 二买\n",
      "[SH.600016 - 2022-03-08 00:00:00] // 1buy 平仓做多（85.009567 - 1655.6219777167476） 盈亏：-2924.545296964119  (-2.04%)，原因： 1buy 止损\n",
      "[SH.600016 - 2022-03-08 00:00:00] // 2buy 平仓做多（85.009567 - 1638.3947161603953） 盈亏：-5064.699135093833  (-3.51%)，原因： 2buy 止损\n",
      "[SH.600016 - 2022-03-23 00:00:00] // 1buy 做多买入（82.801526 - 1701.8929231324587），原因： 一买\n",
      "[SZ.000792 - 2022-04-06 00:00:00] // down_pz_bc_buy 平仓做多（182.443541 - 1561.7741496078554） 盈亏：193717.3132244388  (212.37%)，原因： 小转大验证分型\n",
      "[SH.600028 - 2022-04-20 00:00:00] // 1buy 平仓做多（11.824045 - 9728.886354231563） 盈亏：17077.396355286925  (17.43%)，原因： 退出\n",
      "[SZ.300498 - 2022-04-20 00:00:00] // 1buy 平仓做多（44.348686 - 5336.2697390026615） 盈亏：87114.8436213567  (58.25%)，原因： 退出\n",
      "[SZ.300498 - 2022-04-20 00:00:00] // 2buy 平仓做多（44.348686 - 5447.870014456617） 盈亏：91712.52186992086  (61.19%)，原因： 退出\n",
      "[SH.600019 - 2022-04-20 00:00:00] // 3buy 平仓做多（16.103611 - 8809.929907172136） 盈亏：13423.2056534133  (10.45%)，原因： 退出\n",
      "[SH.601211 - 2022-04-20 00:00:00] // 1buy 平仓做多（17.812245 - 5935.602011361862） 盈亏：6955.920125910969  (7.04%)，原因： 退出\n",
      "[SH.601211 - 2022-04-20 00:00:00] // 2buy 平仓做多（17.812245 - 5862.607508526897） 盈亏：5406.719423448827  (5.46%)，原因： 退出\n",
      "[SH.600016 - 2022-04-20 00:00:00] // 1buy 平仓做多（82.580722 - 1701.8929231324587） 盈亏：-375.78476499934914  (-0.27%)，原因： 退出\n",
      "运行完成，执行时间：637.8160779476166\n",
      "save to : ./data/bk/a_strategy_a_single_allmmd_signal.pkl\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Done\n"
     ]
    }
   ],
   "source": [
    "# 运行回测\n",
    "BT.run(BT.frequencys[0])\n",
    "# 多进程回测，只支持信号回测模式\n",
    "# BT.run_process(BT.frequencys[0], 4)\n",
    "# 保存回测结果到文件中\n",
    "BT.save()\n",
    "print('Done')\n",
    "# 10m 57.59s"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-05-06T06:33:48.847311Z",
     "iopub.status.busy": "2022-05-06T06:33:48.847311Z",
     "iopub.status.idle": "2022-05-06T06:33:49.016472Z",
     "shell.execute_reply": "2022-05-06T06:33:49.015502Z",
     "shell.execute_reply.started": "2022-05-06T06:33:48.847311Z"
    },
    "pycharm": {
     "name": "#%%\n"
    },
    "tags": []
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2022-05-06 14:33:48\n",
      "Save File : ./data/bk/a_strategy_a_single_allmmd_signal.pkl\n",
      "Mode trade init balance 1000000 fee rate 0.0006\n",
      "is stock True is futures False\n",
      "STR Class : <chanlun.strategy.strategy_a_single_all_mmd.StrategyASingleAllMmd object at 0x0000027254450948>\n",
      "Base Code : SH.000001\n",
      "Run Codes : ['SH.600519', 'SH.601398', 'SH.601939', 'SH.601288', 'SH.601857', 'SH.600036', 'SH.601988', 'SH.601318', 'SZ.002594', 'SH.601628', 'SZ.000858', 'SH.601088', 'SH.600028', 'SH.600900', 'SH.601658', 'SH.601166', 'SZ.000333', 'SZ.300760', 'SH.601012', 'SH.601328', 'SH.603288', 'SZ.002415', 'SH.601888', 'SH.600809', 'SH.688981', 'SZ.000568', 'SZ.000001', 'SZ.300059', 'SH.603259', 'SH.600030', 'SH.601899', 'SZ.002714', 'SH.601668', 'SH.600309', 'SH.600690', 'SH.600887', 'SZ.002352', 'SZ.002304', 'SH.601919', 'SZ.002142', 'SH.600000', 'SH.601998', 'SH.601633', 'SZ.000002', 'SH.601816', 'SH.600585', 'SZ.002475', 'SH.600048', 'SH.601319', 'SZ.000651', 'SH.601601', 'SZ.300015', 'SH.600104', 'SH.601138', 'SH.600276', 'SH.600436', 'SH.600438', 'SZ.002812', 'SH.601995', 'SH.601390', 'SH.600406', 'SH.601800', 'SH.600188', 'SH.601818', 'SH.601066', 'SH.600905', 'SH.601225', 'SH.600016', 'SZ.000792', 'SZ.300122', 'SH.600346', 'SZ.002460', 'SH.600018', 'SH.603392', 'SZ.000725', 'SH.601766', 'SZ.003816', 'SZ.002493', 'SH.600031', 'SH.600019', 'SH.601111', 'SH.601985', 'SZ.002459', 'SH.603501', 'SH.601211', 'SH.601238', 'SZ.002129', 'SH.601898', 'SZ.300014', 'SZ.002371', 'SZ.002241', 'SH.601688', 'SZ.000776', 'SZ.300498', 'SZ.002271', 'SH.600600', 'SH.600837', 'SZ.001979', 'SH.601669', 'SH.601009']\n",
      "Frequencys : ['d']\n",
      "Start time : 2017-01-01 00:00:00 End time : 2022-04-20 00:00:00\n",
      "CL Config : {'default': {'fx_bh': 'fx_bh_yes', 'fx_qj': 'fx_qj_k', 'bi_type': 'bi_type_old', 'bi_bzh': 'bi_bzh_no', 'bi_qj': 'bi_qj_dd', 'bi_fx_cgd': 'bi_fx_cgd_no', 'xd_bzh': 'xd_bzh_no', 'zsd_bzh': 'zsd_bzh_no', 'zs_bi_type': 'zs_type_dn', 'zs_xd_type': 'zs_type_bz', 'zs_wzgx': 'zs_wzgx_zggdd', 'xd_qj': 'xd_qj_dd', 'zsd_qj': 'zsd_qj_dd', 'zs_qj': 'zs_qj_ck', 'idx_macd_fast': 12, 'idx_macd_slow': 26, 'idx_macd_signal': 9, 'idx_boll_period': 20, 'idx_ma_period': 5}}\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "首个交易日：2017-01-03 00:00:00 最后交易日：2022-04-20 00:00:00 总交易日：1287\n",
      "起始资金：1000000 结束资金：1,656,654.08 总手续费：16,188.58\n",
      "基准收益率：1.47%  基准年化收益：0.27%\n",
      "总收益率：65.67% 年化收益率：12.25%\n",
      "最大回撤：-220,695.11 百分比最大回撤：-19.14% 最长回撤天数：789\n",
      "日均收益率：0.04% 收益标准差：1.06% Sharpe Ratio: 0.54 收益回撤比：3.43 \n",
      "+--------------+------+------+--------+-----------+-----------+-----------+----------+-----------+----------+---------+\n",
      "|    买卖点    | 成功 | 失败 |  胜率  |    盈利   |    亏损   |   净利润  | 回吐比例 |  平均盈利 | 平均亏损 |  盈亏比 |\n",
      "+--------------+------+------+--------+-----------+-----------+-----------+----------+-----------+----------+---------+\n",
      "|   一类买点   |  4   |  6   | 40.0%  | 117552.34 |  28990.72 |  88561.61 |  24.66   |  29388.08 | 4831.79  |  6.0822 |\n",
      "|   二类买点   |  2   |  7   | 22.22% |  97119.24 |  59261.18 |  37858.06 |  61.02   |  48559.62 | 8465.88  |  5.7359 |\n",
      "|  类二类买点  |  0   |  0   |   0%   |     0     |     0     |     0     |    0     |     0     |    0     |    0    |\n",
      "|   三类买点   |  25  |  30  | 45.45% | 468874.21 | 221022.02 | 247852.19 |  47.14   |  18754.97 |  7367.4  |  2.5457 |\n",
      "|  类三类买点  |  15  |  22  | 40.54% | 323706.58 |  192148.1 | 131558.48 |  59.36   |  21580.44 |  8734.0  |  2.4709 |\n",
      "| 下跌盘整背驰 |  1   |  4   | 20.0%  | 193717.31 |  27356.51 | 166360.81 |  14.12   | 193717.31 | 6839.13  | 28.3249 |\n",
      "| 下跌趋势背驰 |  0   |  0   |   0%   |     0     |     0     |     0     |    0     |     0     |    0     |    0    |\n",
      "|   一类卖点   |  0   |  0   |   0%   |     0     |     0     |     0     |    0     |     0     |    0     |    0    |\n",
      "|   二类卖点   |  0   |  0   |   0%   |     0     |     0     |     0     |    0     |     0     |    0     |    0    |\n",
      "|  类二类卖点  |  0   |  0   |   0%   |     0     |     0     |     0     |    0     |     0     |    0     |    0    |\n",
      "|   三类卖点   |  0   |  0   |   0%   |     0     |     0     |     0     |    0     |     0     |    0     |    0    |\n",
      "|  类三类卖点  |  0   |  0   |   0%   |     0     |     0     |     0     |    0     |     0     |    0     |    0    |\n",
      "| 上涨盘整背驰 |  0   |  0   |   0%   |     0     |     0     |     0     |    0     |     0     |    0     |    0    |\n",
      "| 上涨趋势背驰 |  0   |  0   |   0%   |     0     |     0     |     0     |    0     |     0     |    0     |    0    |\n",
      "+--------------+------+------+--------+-----------+-----------+-----------+----------+-----------+----------+---------+\n"
     ]
    }
   ],
   "source": [
    "# 输出回测结果\n",
    "BT.info()\n",
    "BT.result()\n",
    "\n",
    "# 信号模式结果，总盈利 110W\n",
    "# |   一类买点   |  4   |  7   | 36.36% |  89163.19 |  23073.57 |  66089.62 |  25.88   | 22290.8  | 3296.22  |  6.7625 |\n",
    "# |   二类买点   |  2   |  8   | 20.0%  |  65978.99 |  50110.35 |  15868.64 |  75.95   | 32989.49 | 6263.79  |  5.2667 |\n",
    "# |   三类买点   |  34  |  34  | 50.0%  | 872771.93 | 235193.11 | 637578.82 |  26.95   | 25669.76 | 6917.44  |  3.7109 |\n",
    "# |  类三类买点  |  20  |  24  | 45.45% | 368807.73 | 155924.38 | 212883.35 |  42.28   | 18440.39 | 6496.85  |  2.8384 |\n",
    "# | 下跌盘整背驰 |  2   |  5   | 28.57% | 211139.01 |  34745.79 | 176393.21 |  16.46   | 105569.5 | 6949.16  | 15.1917 |\n",
    "\n",
    "# 交易模式 最大持仓 10，总盈利 65W\n",
    "# 首个交易日：2017-01-03 00:00:00 最后交易日：2022-04-20 00:00:00 总交易日：1287\n",
    "# 起始资金：1000000 结束资金：1,656,654.08 总手续费：16,188.58\n",
    "# 基准收益率：1.47%  基准年化收益：0.27%\n",
    "# 总收益率：65.67% 年化收益率：12.25%\n",
    "# 最大回撤：-220,695.11 百分比最大回撤：-19.14% 最长回撤天数：789\n",
    "# 日均收益率：0.04% 收益标准差：1.06% Sharpe Ratio: 0.54 收益回撤比：3.43 \n",
    "# |   一类买点   |  4   |  6   | 40.0%  | 117552.34 |  28990.72 |  88561.61 |  24.66   |  29388.08 | 4831.79  |  6.0822 |\n",
    "# |   二类买点   |  2   |  7   | 22.22% |  97119.24 |  59261.18 |  37858.06 |  61.02   |  48559.62 | 8465.88  |  5.7359 |\n",
    "# |   三类买点   |  25  |  30  | 45.45% | 468874.21 | 221022.02 | 247852.19 |  47.14   |  18754.97 |  7367.4  |  2.5457 |\n",
    "# |  类三类买点  |  15  |  22  | 40.54% | 323706.58 |  192148.1 | 131558.48 |  59.36   |  21580.44 |  8734.0  |  2.4709 |\n",
    "# | 下跌盘整背驰 |  1   |  4   | 20.0%  | 193717.31 |  27356.51 | 166360.81 |  14.12   | 193717.31 | 6839.13  | 28.3249 |"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "# 显示净盈利变化曲线\n",
    "BT.backtest_charts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-05-06T01:26:40.121176Z",
     "iopub.status.busy": "2022-05-06T01:26:40.121176Z",
     "iopub.status.idle": "2022-05-06T01:26:40.212176Z",
     "shell.execute_reply": "2022-05-06T01:26:40.211174Z",
     "shell.execute_reply.started": "2022-05-06T01:26:40.121176Z"
    },
    "pycharm": {
     "name": "#%%\n"
    },
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "116 70\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>code</th>\n",
       "      <th>mmd</th>\n",
       "      <th>open_datetime</th>\n",
       "      <th>close_datetime</th>\n",
       "      <th>type</th>\n",
       "      <th>price</th>\n",
       "      <th>amount</th>\n",
       "      <th>loss_price</th>\n",
       "      <th>profit_rate</th>\n",
       "      <th>max_profit_rate</th>\n",
       "      <th>max_loss_rate</th>\n",
       "      <th>open_msg</th>\n",
       "      <th>close_msg</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>SZ.300122</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2021-03-01 00:00:00</td>\n",
       "      <td>2021-03-09 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>783.638367</td>\n",
       "      <td>340.015775</td>\n",
       "      <td>676.841783</td>\n",
       "      <td>-20.55</td>\n",
       "      <td>4.9782</td>\n",
       "      <td>-20.9720</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>54</th>\n",
       "      <td>SH.601998</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2018-02-05 00:00:00</td>\n",
       "      <td>2018-02-09 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>11.019615</td>\n",
       "      <td>8671.195446</td>\n",
       "      <td>9.584628</td>\n",
       "      <td>-15.23</td>\n",
       "      <td>1.7199</td>\n",
       "      <td>-19.7789</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>72</th>\n",
       "      <td>SZ.000792</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2021-10-15 00:00:00</td>\n",
       "      <td>2021-11-05 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>192.655397</td>\n",
       "      <td>780.478111</td>\n",
       "      <td>171.297672</td>\n",
       "      <td>-13.38</td>\n",
       "      <td>8.2741</td>\n",
       "      <td>-13.7686</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>SZ.002129</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2021-02-22 00:00:00</td>\n",
       "      <td>2021-03-08 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>121.468002</td>\n",
       "      <td>1425.864613</td>\n",
       "      <td>106.976342</td>\n",
       "      <td>-13.18</td>\n",
       "      <td>0.4522</td>\n",
       "      <td>-13.3913</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51</th>\n",
       "      <td>SZ.000001</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-11-18 00:00:00</td>\n",
       "      <td>2020-12-31 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>2214.467452</td>\n",
       "      <td>60.577778</td>\n",
       "      <td>2002.137691</td>\n",
       "      <td>-12.85</td>\n",
       "      <td>13.1094</td>\n",
       "      <td>-14.2929</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>SZ.002129</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2018-01-24 00:00:00</td>\n",
       "      <td>2018-01-31 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>45.386254</td>\n",
       "      <td>2213.893575</td>\n",
       "      <td>41.527164</td>\n",
       "      <td>-12.38</td>\n",
       "      <td>0.0924</td>\n",
       "      <td>-14.8799</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>86</th>\n",
       "      <td>SH.601390</td>\n",
       "      <td>2buy</td>\n",
       "      <td>2019-12-09 00:00:00</td>\n",
       "      <td>2020-02-03 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>6.627270</td>\n",
       "      <td>14205.118247</td>\n",
       "      <td>6.441242</td>\n",
       "      <td>-12.28</td>\n",
       "      <td>7.8947</td>\n",
       "      <td>-12.2807</td>\n",
       "      <td>二买</td>\n",
       "      <td>2buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>82</th>\n",
       "      <td>SZ.002371</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2019-06-21 00:00:00</td>\n",
       "      <td>2019-08-06 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>318.438394</td>\n",
       "      <td>304.389380</td>\n",
       "      <td>282.160602</td>\n",
       "      <td>-12.07</td>\n",
       "      <td>7.8779</td>\n",
       "      <td>-15.9463</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>SZ.002241</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2017-11-13 00:00:00</td>\n",
       "      <td>2017-11-28 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>511.539706</td>\n",
       "      <td>204.217439</td>\n",
       "      <td>455.449826</td>\n",
       "      <td>-11.71</td>\n",
       "      <td>1.7544</td>\n",
       "      <td>-16.5351</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50</th>\n",
       "      <td>SZ.000001</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2018-02-05 00:00:00</td>\n",
       "      <td>2018-02-07 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>1670.921491</td>\n",
       "      <td>56.653073</td>\n",
       "      <td>1553.784726</td>\n",
       "      <td>-11.20</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>-12.3024</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>SZ.300122</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2018-01-02 00:00:00</td>\n",
       "      <td>2018-02-05 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>118.724413</td>\n",
       "      <td>858.897120</td>\n",
       "      <td>112.972341</td>\n",
       "      <td>-10.53</td>\n",
       "      <td>21.8892</td>\n",
       "      <td>-10.5263</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>SZ.002129</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2018-01-04 00:00:00</td>\n",
       "      <td>2018-01-10 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>50.419849</td>\n",
       "      <td>2029.439738</td>\n",
       "      <td>45.931560</td>\n",
       "      <td>-10.15</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>-10.6489</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>102</th>\n",
       "      <td>SH.601601</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2020-12-31 00:00:00</td>\n",
       "      <td>2021-04-13 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>51.163853</td>\n",
       "      <td>2542.122559</td>\n",
       "      <td>46.180707</td>\n",
       "      <td>-9.95</td>\n",
       "      <td>22.7604</td>\n",
       "      <td>-11.1719</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>55</th>\n",
       "      <td>SZ.002493</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2018-01-24 00:00:00</td>\n",
       "      <td>2018-02-09 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>97.960052</td>\n",
       "      <td>1023.321332</td>\n",
       "      <td>86.416372</td>\n",
       "      <td>-9.81</td>\n",
       "      <td>7.5049</td>\n",
       "      <td>-12.8374</td>\n",
       "      <td>三买</td>\n",
       "      <td>线段向上背驰，笔不创新高</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>52</th>\n",
       "      <td>SH.600031</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2018-01-25 00:00:00</td>\n",
       "      <td>2018-02-07 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>320.308120</td>\n",
       "      <td>314.682548</td>\n",
       "      <td>297.428968</td>\n",
       "      <td>-9.69</td>\n",
       "      <td>1.8367</td>\n",
       "      <td>-13.1633</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>70</th>\n",
       "      <td>SZ.000792</td>\n",
       "      <td>down_pz_bc_buy</td>\n",
       "      <td>2019-03-20 00:00:00</td>\n",
       "      <td>2019-03-26 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>47.759111</td>\n",
       "      <td>2022.251523</td>\n",
       "      <td>43.898531</td>\n",
       "      <td>-9.39</td>\n",
       "      <td>1.5645</td>\n",
       "      <td>-9.9087</td>\n",
       "      <td>线段背驰</td>\n",
       "      <td>down_pz_bc_buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>SH.600028</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2018-01-26 00:00:00</td>\n",
       "      <td>2018-02-08 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>15.346164</td>\n",
       "      <td>6599.005206</td>\n",
       "      <td>14.306451</td>\n",
       "      <td>-8.94</td>\n",
       "      <td>4.6070</td>\n",
       "      <td>-10.8401</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>71</th>\n",
       "      <td>SZ.000792</td>\n",
       "      <td>down_pz_bc_buy</td>\n",
       "      <td>2019-04-01 00:00:00</td>\n",
       "      <td>2019-06-17 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>43.898531</td>\n",
       "      <td>2165.602658</td>\n",
       "      <td>41.096497</td>\n",
       "      <td>-8.94</td>\n",
       "      <td>14.8936</td>\n",
       "      <td>-8.9362</td>\n",
       "      <td>线段背驰</td>\n",
       "      <td>down_pz_bc_buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>104</th>\n",
       "      <td>SH.601816</td>\n",
       "      <td>2buy</td>\n",
       "      <td>2021-04-06 00:00:00</td>\n",
       "      <td>2021-06-22 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>5.946752</td>\n",
       "      <td>30725.748792</td>\n",
       "      <td>5.493186</td>\n",
       "      <td>-8.64</td>\n",
       "      <td>4.0678</td>\n",
       "      <td>-9.1525</td>\n",
       "      <td>二买</td>\n",
       "      <td>2buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>105</th>\n",
       "      <td>SZ.300498</td>\n",
       "      <td>1buy</td>\n",
       "      <td>2021-05-14 00:00:00</td>\n",
       "      <td>2021-07-19 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>28.392229</td>\n",
       "      <td>5198.362147</td>\n",
       "      <td>26.945491</td>\n",
       "      <td>-8.12</td>\n",
       "      <td>5.8740</td>\n",
       "      <td>-9.9840</td>\n",
       "      <td>一买</td>\n",
       "      <td>1buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>106</th>\n",
       "      <td>SZ.300498</td>\n",
       "      <td>2buy</td>\n",
       "      <td>2021-06-23 00:00:00</td>\n",
       "      <td>2021-07-19 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>28.352041</td>\n",
       "      <td>5597.725369</td>\n",
       "      <td>27.307175</td>\n",
       "      <td>-7.99</td>\n",
       "      <td>5.8824</td>\n",
       "      <td>-9.8564</td>\n",
       "      <td>二买</td>\n",
       "      <td>2buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>SH.600346</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-04-06 00:00:00</td>\n",
       "      <td>2017-04-18 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>42.961851</td>\n",
       "      <td>2295.728565</td>\n",
       "      <td>39.783059</td>\n",
       "      <td>-7.96</td>\n",
       "      <td>2.1300</td>\n",
       "      <td>-8.1839</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>64</th>\n",
       "      <td>SZ.000725</td>\n",
       "      <td>2buy</td>\n",
       "      <td>2018-11-01 00:00:00</td>\n",
       "      <td>2018-12-21 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>9.567335</td>\n",
       "      <td>10335.857008</td>\n",
       "      <td>8.854874</td>\n",
       "      <td>-7.80</td>\n",
       "      <td>5.3192</td>\n",
       "      <td>-7.8014</td>\n",
       "      <td>二买</td>\n",
       "      <td>2buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>SH.601111</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2017-06-26 00:00:00</td>\n",
       "      <td>2017-07-10 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>11.010978</td>\n",
       "      <td>9219.958727</td>\n",
       "      <td>10.483506</td>\n",
       "      <td>-7.65</td>\n",
       "      <td>0.1996</td>\n",
       "      <td>-7.8490</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>89</th>\n",
       "      <td>SH.601985</td>\n",
       "      <td>down_pz_bc_buy</td>\n",
       "      <td>2020-03-05 00:00:00</td>\n",
       "      <td>2020-03-13 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>5.245229</td>\n",
       "      <td>17780.276962</td>\n",
       "      <td>4.891979</td>\n",
       "      <td>-7.14</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>-8.7755</td>\n",
       "      <td>线段背驰</td>\n",
       "      <td>down_pz_bc_buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>87</th>\n",
       "      <td>SH.601899</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-02-06 00:00:00</td>\n",
       "      <td>2020-03-13 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>8.037298</td>\n",
       "      <td>11585.442029</td>\n",
       "      <td>7.511857</td>\n",
       "      <td>-7.02</td>\n",
       "      <td>17.6755</td>\n",
       "      <td>-14.0436</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>SH.600436</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-11-21 00:00:00</td>\n",
       "      <td>2017-11-24 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>343.585066</td>\n",
       "      <td>304.616991</td>\n",
       "      <td>321.213491</td>\n",
       "      <td>-6.75</td>\n",
       "      <td>1.7305</td>\n",
       "      <td>-7.8897</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>SH.600188</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-08-21 00:00:00</td>\n",
       "      <td>2017-10-19 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>27.015936</td>\n",
       "      <td>3646.951578</td>\n",
       "      <td>25.770670</td>\n",
       "      <td>-6.64</td>\n",
       "      <td>12.8125</td>\n",
       "      <td>-6.7969</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>SZ.300760</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2020-11-20 00:00:00</td>\n",
       "      <td>2020-11-25 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>350.836870</td>\n",
       "      <td>385.960885</td>\n",
       "      <td>334.414331</td>\n",
       "      <td>-6.49</td>\n",
       "      <td>1.8730</td>\n",
       "      <td>-6.4904</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>SH.601628</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-12-05 00:00:00</td>\n",
       "      <td>2017-12-14 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>37.881385</td>\n",
       "      <td>2740.310868</td>\n",
       "      <td>35.798439</td>\n",
       "      <td>-6.37</td>\n",
       "      <td>0.0311</td>\n",
       "      <td>-6.4927</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100</th>\n",
       "      <td>SH.600900</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2020-11-27 00:00:00</td>\n",
       "      <td>2020-12-22 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>55.081553</td>\n",
       "      <td>2297.555027</td>\n",
       "      <td>52.749197</td>\n",
       "      <td>-5.71</td>\n",
       "      <td>1.9202</td>\n",
       "      <td>-5.8099</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57</th>\n",
       "      <td>SZ.002493</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-01-14 00:00:00</td>\n",
       "      <td>2020-01-23 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>119.866330</td>\n",
       "      <td>780.632995</td>\n",
       "      <td>116.916379</td>\n",
       "      <td>-5.66</td>\n",
       "      <td>0.1641</td>\n",
       "      <td>-5.6604</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>107</th>\n",
       "      <td>SZ.300498</td>\n",
       "      <td>1buy</td>\n",
       "      <td>2021-07-26 00:00:00</td>\n",
       "      <td>2021-07-28 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>26.556221</td>\n",
       "      <td>5695.632800</td>\n",
       "      <td>25.557561</td>\n",
       "      <td>-5.60</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>-5.9862</td>\n",
       "      <td>一买</td>\n",
       "      <td>1buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>SH.601888</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2017-12-20 00:00:00</td>\n",
       "      <td>2017-12-27 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>93.307171</td>\n",
       "      <td>1107.588544</td>\n",
       "      <td>89.584298</td>\n",
       "      <td>-5.46</td>\n",
       "      <td>1.9950</td>\n",
       "      <td>-5.5492</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>SH.600887</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2017-04-20 00:00:00</td>\n",
       "      <td>2017-05-09 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>1174.483062</td>\n",
       "      <td>83.147426</td>\n",
       "      <td>1121.940399</td>\n",
       "      <td>-5.28</td>\n",
       "      <td>0.2632</td>\n",
       "      <td>-5.7895</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>60</th>\n",
       "      <td>SH.600837</td>\n",
       "      <td>1buy</td>\n",
       "      <td>2018-08-28 00:00:00</td>\n",
       "      <td>2018-09-10 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>149.549038</td>\n",
       "      <td>664.391723</td>\n",
       "      <td>142.182934</td>\n",
       "      <td>-5.27</td>\n",
       "      <td>0.2291</td>\n",
       "      <td>-5.4983</td>\n",
       "      <td>一买</td>\n",
       "      <td>1buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>67</th>\n",
       "      <td>SZ.000776</td>\n",
       "      <td>2buy</td>\n",
       "      <td>2018-11-13 00:00:00</td>\n",
       "      <td>2018-12-25 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>70.967492</td>\n",
       "      <td>1397.466764</td>\n",
       "      <td>67.454250</td>\n",
       "      <td>-5.26</td>\n",
       "      <td>9.9010</td>\n",
       "      <td>-7.7685</td>\n",
       "      <td>二买</td>\n",
       "      <td>2buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>SH.601111</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2017-07-18 00:00:00</td>\n",
       "      <td>2017-07-25 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>10.446793</td>\n",
       "      <td>9643.244203</td>\n",
       "      <td>9.968908</td>\n",
       "      <td>-5.11</td>\n",
       "      <td>0.6383</td>\n",
       "      <td>-5.3191</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>79</th>\n",
       "      <td>SH.600690</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2019-07-25 00:00:00</td>\n",
       "      <td>2019-08-02 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>569.292901</td>\n",
       "      <td>171.482141</td>\n",
       "      <td>549.523459</td>\n",
       "      <td>-4.77</td>\n",
       "      <td>0.0589</td>\n",
       "      <td>-5.3561</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>90</th>\n",
       "      <td>SZ.002714</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2020-05-25 00:00:00</td>\n",
       "      <td>2020-06-12 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>907.351003</td>\n",
       "      <td>101.433804</td>\n",
       "      <td>848.459703</td>\n",
       "      <td>-4.73</td>\n",
       "      <td>4.5417</td>\n",
       "      <td>-6.9024</td>\n",
       "      <td>类三买</td>\n",
       "      <td>小转大验证分型</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>SH.600188</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2017-09-27 00:00:00</td>\n",
       "      <td>2017-10-12 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>27.796865</td>\n",
       "      <td>3708.128757</td>\n",
       "      <td>26.614918</td>\n",
       "      <td>-4.71</td>\n",
       "      <td>0.9112</td>\n",
       "      <td>-7.0615</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>SH.600000</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-07-20 00:00:00</td>\n",
       "      <td>2020-07-24 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>112.661729</td>\n",
       "      <td>1020.437399</td>\n",
       "      <td>108.945457</td>\n",
       "      <td>-4.62</td>\n",
       "      <td>1.9965</td>\n",
       "      <td>-4.8069</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>66</th>\n",
       "      <td>SZ.000725</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2021-05-18 00:00:00</td>\n",
       "      <td>2021-05-28 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>22.679719</td>\n",
       "      <td>6538.318169</td>\n",
       "      <td>21.855002</td>\n",
       "      <td>-4.55</td>\n",
       "      <td>2.2727</td>\n",
       "      <td>-5.0000</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>SH.600030</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-09-18 00:00:00</td>\n",
       "      <td>2017-10-23 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>71.650662</td>\n",
       "      <td>1435.193212</td>\n",
       "      <td>68.843890</td>\n",
       "      <td>-4.35</td>\n",
       "      <td>2.0675</td>\n",
       "      <td>-4.5158</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>SH.601111</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2021-04-19 00:00:00</td>\n",
       "      <td>2021-04-22 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>10.686470</td>\n",
       "      <td>14014.923401</td>\n",
       "      <td>8.911119</td>\n",
       "      <td>-4.29</td>\n",
       "      <td>1.1790</td>\n",
       "      <td>-4.3944</td>\n",
       "      <td>三买</td>\n",
       "      <td>3买后出现笔背驰 ['bi', 'pz']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>SH.600018</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-08-30 00:00:00</td>\n",
       "      <td>2018-06-15 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>84.635169</td>\n",
       "      <td>1168.264725</td>\n",
       "      <td>82.035010</td>\n",
       "      <td>-4.15</td>\n",
       "      <td>35.7911</td>\n",
       "      <td>-5.0934</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>SZ.000333</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-01-04 00:00:00</td>\n",
       "      <td>2017-01-11 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>124.563786</td>\n",
       "      <td>796.539589</td>\n",
       "      <td>114.834198</td>\n",
       "      <td>-4.12</td>\n",
       "      <td>0.3352</td>\n",
       "      <td>-4.5256</td>\n",
       "      <td>三买</td>\n",
       "      <td>线段向上背驰，笔不创新高</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>77</th>\n",
       "      <td>SH.600809</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2019-07-29 00:00:00</td>\n",
       "      <td>2019-08-01 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>227.622451</td>\n",
       "      <td>432.251786</td>\n",
       "      <td>215.459918</td>\n",
       "      <td>-3.98</td>\n",
       "      <td>1.2353</td>\n",
       "      <td>-4.1224</td>\n",
       "      <td>三买</td>\n",
       "      <td>线段向上背驰，笔不创新高</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>63</th>\n",
       "      <td>SH.601818</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-01-02 00:00:00</td>\n",
       "      <td>2020-01-10 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>6.355410</td>\n",
       "      <td>15015.843709</td>\n",
       "      <td>6.141183</td>\n",
       "      <td>-3.82</td>\n",
       "      <td>0.6742</td>\n",
       "      <td>-4.4944</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>62</th>\n",
       "      <td>SH.601818</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2018-11-19 00:00:00</td>\n",
       "      <td>2018-12-18 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>5.389362</td>\n",
       "      <td>18479.910407</td>\n",
       "      <td>5.211088</td>\n",
       "      <td>-3.56</td>\n",
       "      <td>0.2545</td>\n",
       "      <td>-3.5623</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>111</th>\n",
       "      <td>SH.600016</td>\n",
       "      <td>2buy</td>\n",
       "      <td>2022-02-08 00:00:00</td>\n",
       "      <td>2022-03-08 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>88.100824</td>\n",
       "      <td>1638.394716</td>\n",
       "      <td>85.451175</td>\n",
       "      <td>-3.51</td>\n",
       "      <td>0.7519</td>\n",
       "      <td>-3.7594</td>\n",
       "      <td>二买</td>\n",
       "      <td>2buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>81</th>\n",
       "      <td>SZ.001979</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2019-06-21 00:00:00</td>\n",
       "      <td>2019-08-02 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>22.801563</td>\n",
       "      <td>4256.704270</td>\n",
       "      <td>22.030081</td>\n",
       "      <td>-3.49</td>\n",
       "      <td>6.0104</td>\n",
       "      <td>-6.4127</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65</th>\n",
       "      <td>SZ.000725</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2021-02-23 00:00:00</td>\n",
       "      <td>2021-05-28 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>22.404813</td>\n",
       "      <td>7803.056243</td>\n",
       "      <td>20.033751</td>\n",
       "      <td>-3.37</td>\n",
       "      <td>17.3313</td>\n",
       "      <td>-13.0368</td>\n",
       "      <td>三买</td>\n",
       "      <td>线段中枢上方出现卖点 ['2sell']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>SZ.000333</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2019-07-24 00:00:00</td>\n",
       "      <td>2019-08-05 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>240.912641</td>\n",
       "      <td>404.273274</td>\n",
       "      <td>234.684476</td>\n",
       "      <td>-3.33</td>\n",
       "      <td>4.2713</td>\n",
       "      <td>-4.3649</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>SH.600000</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2017-01-03 00:00:00</td>\n",
       "      <td>2017-03-22 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>116.199244</td>\n",
       "      <td>852.875308</td>\n",
       "      <td>113.989320</td>\n",
       "      <td>-3.19</td>\n",
       "      <td>4.7853</td>\n",
       "      <td>-3.6810</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>68</th>\n",
       "      <td>SZ.000776</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2020-10-29 00:00:00</td>\n",
       "      <td>2020-10-30 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>89.021914</td>\n",
       "      <td>1687.045693</td>\n",
       "      <td>86.779549</td>\n",
       "      <td>-3.02</td>\n",
       "      <td>0.5038</td>\n",
       "      <td>-3.1486</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>76</th>\n",
       "      <td>SH.601398</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-01-02 00:00:00</td>\n",
       "      <td>2020-01-16 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>10.605060</td>\n",
       "      <td>8956.585650</td>\n",
       "      <td>10.320838</td>\n",
       "      <td>-2.85</td>\n",
       "      <td>1.3400</td>\n",
       "      <td>-3.0151</td>\n",
       "      <td>三买</td>\n",
       "      <td>3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>59</th>\n",
       "      <td>SZ.002493</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-08-10 00:00:00</td>\n",
       "      <td>2020-09-24 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>188.877410</td>\n",
       "      <td>591.088036</td>\n",
       "      <td>155.592858</td>\n",
       "      <td>-2.68</td>\n",
       "      <td>13.4140</td>\n",
       "      <td>-8.6796</td>\n",
       "      <td>三买</td>\n",
       "      <td>线段向上背驰，笔不创新高</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>85</th>\n",
       "      <td>SH.601939</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2019-12-31 00:00:00</td>\n",
       "      <td>2020-01-21 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>12.777239</td>\n",
       "      <td>7379.429621</td>\n",
       "      <td>12.459134</td>\n",
       "      <td>-2.63</td>\n",
       "      <td>2.2130</td>\n",
       "      <td>-2.7662</td>\n",
       "      <td>类三买</td>\n",
       "      <td>l3buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>SH.601628</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-12-19 00:00:00</td>\n",
       "      <td>2017-12-27 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>37.045853</td>\n",
       "      <td>2785.310282</td>\n",
       "      <td>35.398324</td>\n",
       "      <td>-2.60</td>\n",
       "      <td>2.6048</td>\n",
       "      <td>-3.4308</td>\n",
       "      <td>三买</td>\n",
       "      <td>线段向上背驰，笔不创新高</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>101</th>\n",
       "      <td>SH.601857</td>\n",
       "      <td>down_pz_bc_buy</td>\n",
       "      <td>2021-01-04 00:00:00</td>\n",
       "      <td>2021-01-29 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>5.834617</td>\n",
       "      <td>22501.592530</td>\n",
       "      <td>5.709291</td>\n",
       "      <td>-2.39</td>\n",
       "      <td>5.0119</td>\n",
       "      <td>-2.6253</td>\n",
       "      <td>线段背驰</td>\n",
       "      <td>down_pz_bc_buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>SH.600309</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-03-27 00:00:00</td>\n",
       "      <td>2017-03-29 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>645.935505</td>\n",
       "      <td>152.797173</td>\n",
       "      <td>561.238253</td>\n",
       "      <td>-2.36</td>\n",
       "      <td>1.1050</td>\n",
       "      <td>-2.8361</td>\n",
       "      <td>三买</td>\n",
       "      <td>笔快速上涨，内部macd背驰 macd jd -22.71522431560135 dif ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110</th>\n",
       "      <td>SH.600016</td>\n",
       "      <td>1buy</td>\n",
       "      <td>2021-11-15 00:00:00</td>\n",
       "      <td>2022-03-08 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>86.776000</td>\n",
       "      <td>1655.621978</td>\n",
       "      <td>85.230371</td>\n",
       "      <td>-2.04</td>\n",
       "      <td>2.5445</td>\n",
       "      <td>-2.2901</td>\n",
       "      <td>一买</td>\n",
       "      <td>1buy 止损</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>SZ.300015</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2017-07-21 00:00:00</td>\n",
       "      <td>2017-08-24 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>254.878937</td>\n",
       "      <td>396.179730</td>\n",
       "      <td>236.127931</td>\n",
       "      <td>-1.72</td>\n",
       "      <td>4.1410</td>\n",
       "      <td>-3.7004</td>\n",
       "      <td>类三买</td>\n",
       "      <td>小转大验证分型</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>SH.600436</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-05-12 00:00:00</td>\n",
       "      <td>2017-08-04 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>279.012010</td>\n",
       "      <td>346.441612</td>\n",
       "      <td>262.564142</td>\n",
       "      <td>-1.54</td>\n",
       "      <td>10.7190</td>\n",
       "      <td>-4.8167</td>\n",
       "      <td>三买</td>\n",
       "      <td>线段向上背驰，笔不创新高</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>58</th>\n",
       "      <td>SZ.002493</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-07-13 00:00:00</td>\n",
       "      <td>2020-07-27 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>163.839479</td>\n",
       "      <td>686.155152</td>\n",
       "      <td>116.148181</td>\n",
       "      <td>-1.39</td>\n",
       "      <td>7.5804</td>\n",
       "      <td>-10.1274</td>\n",
       "      <td>三买</td>\n",
       "      <td>笔快速上涨，内部macd背驰 macd jd -26.62164696115866 dif ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>61</th>\n",
       "      <td>SH.600837</td>\n",
       "      <td>2buy</td>\n",
       "      <td>2018-11-15 00:00:00</td>\n",
       "      <td>2018-12-06 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>164.966465</td>\n",
       "      <td>602.311984</td>\n",
       "      <td>157.600361</td>\n",
       "      <td>-1.25</td>\n",
       "      <td>6.7497</td>\n",
       "      <td>-4.5691</td>\n",
       "      <td>二买</td>\n",
       "      <td>线段出现三卖，并且次笔不创新高</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>112</th>\n",
       "      <td>SH.600016</td>\n",
       "      <td>1buy</td>\n",
       "      <td>2022-03-23 00:00:00</td>\n",
       "      <td>2022-04-20 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>82.801526</td>\n",
       "      <td>1701.892923</td>\n",
       "      <td>77.723033</td>\n",
       "      <td>-0.27</td>\n",
       "      <td>4.5333</td>\n",
       "      <td>-0.5333</td>\n",
       "      <td>一买</td>\n",
       "      <td>退出</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>74</th>\n",
       "      <td>SZ.002352</td>\n",
       "      <td>1buy</td>\n",
       "      <td>2019-02-14 00:00:00</td>\n",
       "      <td>2019-04-12 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>120.191420</td>\n",
       "      <td>802.301572</td>\n",
       "      <td>102.564719</td>\n",
       "      <td>0.00</td>\n",
       "      <td>11.1206</td>\n",
       "      <td>-3.5735</td>\n",
       "      <td>一买</td>\n",
       "      <td>小转大验证分型</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56</th>\n",
       "      <td>SZ.002493</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2018-02-26 00:00:00</td>\n",
       "      <td>2018-07-27 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>110.277609</td>\n",
       "      <td>815.310654</td>\n",
       "      <td>86.416372</td>\n",
       "      <td>0.25</td>\n",
       "      <td>5.0263</td>\n",
       "      <td>-19.2982</td>\n",
       "      <td>三买</td>\n",
       "      <td>3买后出现笔背驰 ['bi', 'pz']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>SH.600900</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-11-02 00:00:00</td>\n",
       "      <td>2020-11-16 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>53.671291</td>\n",
       "      <td>2711.210049</td>\n",
       "      <td>50.498203</td>\n",
       "      <td>0.96</td>\n",
       "      <td>5.2552</td>\n",
       "      <td>-0.3537</td>\n",
       "      <td>三买</td>\n",
       "      <td>线段向上背驰，笔不创新高</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>SH.601111</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2021-03-11 00:00:00</td>\n",
       "      <td>2021-03-24 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>9.598351</td>\n",
       "      <td>18790.866645</td>\n",
       "      <td>8.911119</td>\n",
       "      <td>1.43</td>\n",
       "      <td>12.4105</td>\n",
       "      <td>-2.0286</td>\n",
       "      <td>三买</td>\n",
       "      <td>3买后出现笔背驰 ['bi', 'pz']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>46</th>\n",
       "      <td>SZ.300122</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-09-25 00:00:00</td>\n",
       "      <td>2020-12-29 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>595.617399</td>\n",
       "      <td>219.130036</td>\n",
       "      <td>480.479306</td>\n",
       "      <td>2.34</td>\n",
       "      <td>19.8472</td>\n",
       "      <td>-18.1709</td>\n",
       "      <td>三买</td>\n",
       "      <td>小转大验证分型</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>SH.600018</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2017-05-08 00:00:00</td>\n",
       "      <td>2017-06-13 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>75.761258</td>\n",
       "      <td>1294.448152</td>\n",
       "      <td>72.715579</td>\n",
       "      <td>2.35</td>\n",
       "      <td>7.5377</td>\n",
       "      <td>-4.5226</td>\n",
       "      <td>类三买</td>\n",
       "      <td>3买后出现笔背驰 ['bi', 'pz']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>SH.600018</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-03-27 00:00:00</td>\n",
       "      <td>2017-06-13 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>75.634355</td>\n",
       "      <td>1306.458715</td>\n",
       "      <td>70.431320</td>\n",
       "      <td>2.52</td>\n",
       "      <td>7.7181</td>\n",
       "      <td>-4.3624</td>\n",
       "      <td>三买</td>\n",
       "      <td>3买后出现笔背驰 ['bi', 'pz']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>SH.601888</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2018-01-03 00:00:00</td>\n",
       "      <td>2018-02-07 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>97.736106</td>\n",
       "      <td>1044.976302</td>\n",
       "      <td>88.129383</td>\n",
       "      <td>3.06</td>\n",
       "      <td>18.0166</td>\n",
       "      <td>-2.4518</td>\n",
       "      <td>类三买</td>\n",
       "      <td>线段中枢上方出现卖点 ['1sell']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>SH.601888</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-11-30 00:00:00</td>\n",
       "      <td>2017-12-14 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>89.199174</td>\n",
       "      <td>1161.942277</td>\n",
       "      <td>81.945991</td>\n",
       "      <td>3.48</td>\n",
       "      <td>7.5798</td>\n",
       "      <td>-4.7014</td>\n",
       "      <td>三买</td>\n",
       "      <td>线段向上背驰，笔不创新高</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49</th>\n",
       "      <td>SZ.300122</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2021-03-12 00:00:00</td>\n",
       "      <td>2021-04-12 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>714.673472</td>\n",
       "      <td>254.742648</td>\n",
       "      <td>619.293801</td>\n",
       "      <td>3.87</td>\n",
       "      <td>13.7468</td>\n",
       "      <td>-11.6600</td>\n",
       "      <td>类三买</td>\n",
       "      <td>线段中枢上方出现卖点 ['2sell']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>SZ.002142</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-01-03 00:00:00</td>\n",
       "      <td>2017-03-03 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>25.915438</td>\n",
       "      <td>3820.116797</td>\n",
       "      <td>24.009015</td>\n",
       "      <td>4.31</td>\n",
       "      <td>8.9655</td>\n",
       "      <td>-3.1034</td>\n",
       "      <td>三买</td>\n",
       "      <td>3买后出现笔背驰 ['pz']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>78</th>\n",
       "      <td>SH.600809</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2019-12-31 00:00:00</td>\n",
       "      <td>2020-01-21 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>296.404949</td>\n",
       "      <td>318.706257</td>\n",
       "      <td>271.093222</td>\n",
       "      <td>5.35</td>\n",
       "      <td>9.6210</td>\n",
       "      <td>-4.1249</td>\n",
       "      <td>三买</td>\n",
       "      <td>线段向上背驰，笔不创新高</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>115</th>\n",
       "      <td>SH.601211</td>\n",
       "      <td>2buy</td>\n",
       "      <td>2018-11-13 00:00:00</td>\n",
       "      <td>2022-04-20 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>16.890007</td>\n",
       "      <td>5862.607509</td>\n",
       "      <td>16.162738</td>\n",
       "      <td>5.46</td>\n",
       "      <td>45.0326</td>\n",
       "      <td>-4.3059</td>\n",
       "      <td>二买</td>\n",
       "      <td>退出</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>SH.600887</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2017-05-15 00:00:00</td>\n",
       "      <td>2017-06-02 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>1158.437580</td>\n",
       "      <td>83.702772</td>\n",
       "      <td>1106.486674</td>\n",
       "      <td>5.90</td>\n",
       "      <td>10.3144</td>\n",
       "      <td>-0.9377</td>\n",
       "      <td>类三买</td>\n",
       "      <td>3买后出现笔背驰 ['pz']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>94</th>\n",
       "      <td>SH.601669</td>\n",
       "      <td>1buy</td>\n",
       "      <td>2020-05-06 00:00:00</td>\n",
       "      <td>2020-10-22 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>4.392338</td>\n",
       "      <td>20800.150797</td>\n",
       "      <td>4.070074</td>\n",
       "      <td>7.01</td>\n",
       "      <td>33.8994</td>\n",
       "      <td>-7.6087</td>\n",
       "      <td>一买</td>\n",
       "      <td>线段出现三卖，并且次笔不创新高</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>114</th>\n",
       "      <td>SH.601211</td>\n",
       "      <td>1buy</td>\n",
       "      <td>2018-10-22 00:00:00</td>\n",
       "      <td>2022-04-20 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>16.640347</td>\n",
       "      <td>5935.602011</td>\n",
       "      <td>14.567088</td>\n",
       "      <td>7.04</td>\n",
       "      <td>47.2085</td>\n",
       "      <td>-6.0013</td>\n",
       "      <td>一买</td>\n",
       "      <td>退出</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>84</th>\n",
       "      <td>SZ.000858</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-12-31 00:00:00</td>\n",
       "      <td>2021-02-22 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>4379.197576</td>\n",
       "      <td>32.680343</td>\n",
       "      <td>3791.753392</td>\n",
       "      <td>7.27</td>\n",
       "      <td>22.3882</td>\n",
       "      <td>-5.7941</td>\n",
       "      <td>三买</td>\n",
       "      <td>线段中枢上方出现卖点 ['1sell']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>SH.601111</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2017-05-24 00:00:00</td>\n",
       "      <td>2017-06-13 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>10.263726</td>\n",
       "      <td>9491.724535</td>\n",
       "      <td>9.780210</td>\n",
       "      <td>7.39</td>\n",
       "      <td>14.5610</td>\n",
       "      <td>-0.8565</td>\n",
       "      <td>类三买</td>\n",
       "      <td>3买后出现笔背驰 ['pz']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>SH.600028</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-01-05 00:00:00</td>\n",
       "      <td>2017-08-31 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>11.437520</td>\n",
       "      <td>8686.613026</td>\n",
       "      <td>9.667191</td>\n",
       "      <td>7.43</td>\n",
       "      <td>11.5412</td>\n",
       "      <td>-5.3913</td>\n",
       "      <td>三买</td>\n",
       "      <td>线段向上背驰，笔不创新高</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>53</th>\n",
       "      <td>SH.600031</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2019-07-12 00:00:00</td>\n",
       "      <td>2019-08-02 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>436.836676</td>\n",
       "      <td>222.535499</td>\n",
       "      <td>411.551384</td>\n",
       "      <td>8.19</td>\n",
       "      <td>14.0916</td>\n",
       "      <td>-0.9901</td>\n",
       "      <td>类三买</td>\n",
       "      <td>线段中枢上方出现卖点 ['1sell']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>SZ.002475</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-04-25 00:00:00</td>\n",
       "      <td>2017-06-28 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>269.519260</td>\n",
       "      <td>363.012840</td>\n",
       "      <td>242.445655</td>\n",
       "      <td>8.73</td>\n",
       "      <td>14.5222</td>\n",
       "      <td>-3.9127</td>\n",
       "      <td>三买</td>\n",
       "      <td>笔快速上涨，内部macd背驰 macd jd -0.5416587694610735 dif...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>SH.600188</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2021-05-27 00:00:00</td>\n",
       "      <td>2021-06-21 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>36.312846</td>\n",
       "      <td>4122.012590</td>\n",
       "      <td>33.075445</td>\n",
       "      <td>8.77</td>\n",
       "      <td>17.0134</td>\n",
       "      <td>-1.9316</td>\n",
       "      <td>类三买</td>\n",
       "      <td>3买后出现笔背驰 ['pz']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>SH.600309</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-04-05 00:00:00</td>\n",
       "      <td>2017-06-15 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>664.968596</td>\n",
       "      <td>148.121878</td>\n",
       "      <td>561.238253</td>\n",
       "      <td>8.92</td>\n",
       "      <td>14.0608</td>\n",
       "      <td>-6.6190</td>\n",
       "      <td>三买</td>\n",
       "      <td>笔快速上涨，内部macd背驰 macd jd -1.7456289784462509 dif...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>SH.601318</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-07-06 00:00:00</td>\n",
       "      <td>2017-09-04 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>115.098543</td>\n",
       "      <td>890.490764</td>\n",
       "      <td>107.304362</td>\n",
       "      <td>9.46</td>\n",
       "      <td>13.5979</td>\n",
       "      <td>-2.5714</td>\n",
       "      <td>三买</td>\n",
       "      <td>3买后出现笔背驰 ['pz']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>93</th>\n",
       "      <td>SH.600600</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-06-19 00:00:00</td>\n",
       "      <td>2020-08-07 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>98.611568</td>\n",
       "      <td>1027.804365</td>\n",
       "      <td>79.338126</td>\n",
       "      <td>10.29</td>\n",
       "      <td>28.0957</td>\n",
       "      <td>-2.9872</td>\n",
       "      <td>三买</td>\n",
       "      <td>笔快速上涨，内部macd背驰 macd jd -8.058304856728826 dif ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>113</th>\n",
       "      <td>SH.600019</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2021-02-08 00:00:00</td>\n",
       "      <td>2022-04-20 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>14.579966</td>\n",
       "      <td>8809.929907</td>\n",
       "      <td>13.556811</td>\n",
       "      <td>10.45</td>\n",
       "      <td>83.9710</td>\n",
       "      <td>-4.1916</td>\n",
       "      <td>三买</td>\n",
       "      <td>退出</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>83</th>\n",
       "      <td>SZ.000858</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2019-07-29 00:00:00</td>\n",
       "      <td>2020-01-20 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>1832.190896</td>\n",
       "      <td>53.449478</td>\n",
       "      <td>1720.408745</td>\n",
       "      <td>11.16</td>\n",
       "      <td>15.6364</td>\n",
       "      <td>-7.6364</td>\n",
       "      <td>三买</td>\n",
       "      <td>3买后出现笔背驰 ['pz']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>69</th>\n",
       "      <td>SZ.000776</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-07-29 00:00:00</td>\n",
       "      <td>2020-11-12 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>85.779910</td>\n",
       "      <td>1290.031869</td>\n",
       "      <td>81.556731</td>\n",
       "      <td>11.23</td>\n",
       "      <td>21.2939</td>\n",
       "      <td>-1.5345</td>\n",
       "      <td>三买</td>\n",
       "      <td>3买后出现笔背驰 ['pz']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>SZ.300122</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2021-01-22 00:00:00</td>\n",
       "      <td>2021-02-19 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>690.912812</td>\n",
       "      <td>254.102957</td>\n",
       "      <td>548.601624</td>\n",
       "      <td>11.28</td>\n",
       "      <td>31.6341</td>\n",
       "      <td>-5.0732</td>\n",
       "      <td>类三买</td>\n",
       "      <td>线段中枢上方出现卖点 ['1sell']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>SZ.300760</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2020-09-25 00:00:00</td>\n",
       "      <td>2020-11-06 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>334.120710</td>\n",
       "      <td>324.873950</td>\n",
       "      <td>315.197328</td>\n",
       "      <td>13.44</td>\n",
       "      <td>24.0273</td>\n",
       "      <td>-0.7848</td>\n",
       "      <td>类三买</td>\n",
       "      <td>线段中枢上方出现卖点 ['2sell']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>SZ.002142</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2020-06-24 00:00:00</td>\n",
       "      <td>2020-07-13 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>53.690594</td>\n",
       "      <td>1905.487023</td>\n",
       "      <td>50.791178</td>\n",
       "      <td>16.03</td>\n",
       "      <td>26.8862</td>\n",
       "      <td>-0.9958</td>\n",
       "      <td>类三买</td>\n",
       "      <td>3买后出现笔背驰 ['pz']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75</th>\n",
       "      <td>SH.601398</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-06-30 00:00:00</td>\n",
       "      <td>2019-05-31 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>8.177920</td>\n",
       "      <td>12509.506019</td>\n",
       "      <td>7.757341</td>\n",
       "      <td>16.72</td>\n",
       "      <td>54.8080</td>\n",
       "      <td>-1.3333</td>\n",
       "      <td>三买</td>\n",
       "      <td>线段向上背驰，笔不创新高</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>SZ.002142</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-05-21 00:00:00</td>\n",
       "      <td>2020-07-13 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>53.135386</td>\n",
       "      <td>1726.691170</td>\n",
       "      <td>50.626672</td>\n",
       "      <td>17.24</td>\n",
       "      <td>28.2121</td>\n",
       "      <td>-4.4118</td>\n",
       "      <td>三买</td>\n",
       "      <td>3买后出现笔背驰 ['pz']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>SH.600028</td>\n",
       "      <td>1buy</td>\n",
       "      <td>2020-10-23 00:00:00</td>\n",
       "      <td>2022-04-20 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>10.068716</td>\n",
       "      <td>9728.886354</td>\n",
       "      <td>9.838202</td>\n",
       "      <td>17.43</td>\n",
       "      <td>31.3617</td>\n",
       "      <td>-1.0256</td>\n",
       "      <td>一买</td>\n",
       "      <td>退出</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>80</th>\n",
       "      <td>SH.600690</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2020-07-29 00:00:00</td>\n",
       "      <td>2020-09-25 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>629.713008</td>\n",
       "      <td>174.091465</td>\n",
       "      <td>566.391867</td>\n",
       "      <td>19.39</td>\n",
       "      <td>35.5556</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>类三买</td>\n",
       "      <td>线段中枢上方出现卖点 ['2sell']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>SH.601111</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2017-10-20 00:00:00</td>\n",
       "      <td>2017-11-27 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>9.868886</td>\n",
       "      <td>10100.077879</td>\n",
       "      <td>9.613273</td>\n",
       "      <td>19.71</td>\n",
       "      <td>30.9685</td>\n",
       "      <td>-1.0135</td>\n",
       "      <td>类三买</td>\n",
       "      <td>3买后出现笔背驰 ['bi', 'pz']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>103</th>\n",
       "      <td>SH.600406</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-12-22 00:00:00</td>\n",
       "      <td>2021-04-16 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>574.427540</td>\n",
       "      <td>207.599889</td>\n",
       "      <td>509.617939</td>\n",
       "      <td>22.56</td>\n",
       "      <td>41.0714</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>三买</td>\n",
       "      <td>小转大验证分型</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>91</th>\n",
       "      <td>SZ.002812</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2019-12-31 00:00:00</td>\n",
       "      <td>2020-06-12 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>176.144000</td>\n",
       "      <td>537.561592</td>\n",
       "      <td>122.080000</td>\n",
       "      <td>22.83</td>\n",
       "      <td>37.0891</td>\n",
       "      <td>-17.7228</td>\n",
       "      <td>三买</td>\n",
       "      <td>笔快速上涨，内部macd背驰 macd jd -3.7622103155489826 dif...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>92</th>\n",
       "      <td>SZ.002460</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-05-08 00:00:00</td>\n",
       "      <td>2020-07-15 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>472.871732</td>\n",
       "      <td>193.568690</td>\n",
       "      <td>342.936792</td>\n",
       "      <td>28.59</td>\n",
       "      <td>40.8944</td>\n",
       "      <td>-6.8090</td>\n",
       "      <td>三买</td>\n",
       "      <td>笔快速上涨，内部macd背驰 macd jd -2.2892046256040803 dif...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>SH.603288</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2017-04-20 00:00:00</td>\n",
       "      <td>2017-10-25 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>139.008279</td>\n",
       "      <td>701.414279</td>\n",
       "      <td>128.568626</td>\n",
       "      <td>34.59</td>\n",
       "      <td>41.0319</td>\n",
       "      <td>-5.8233</td>\n",
       "      <td>三买</td>\n",
       "      <td>线段中枢上方出现卖点 ['1sell']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>SZ.300059</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2020-11-06 00:00:00</td>\n",
       "      <td>2021-01-15 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>1171.237738</td>\n",
       "      <td>105.187356</td>\n",
       "      <td>1080.606246</td>\n",
       "      <td>43.02</td>\n",
       "      <td>56.5079</td>\n",
       "      <td>-2.9762</td>\n",
       "      <td>类三买</td>\n",
       "      <td>3买后出现笔背驰 ['pz']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>108</th>\n",
       "      <td>SZ.300498</td>\n",
       "      <td>1buy</td>\n",
       "      <td>2021-08-09 00:00:00</td>\n",
       "      <td>2022-04-20 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>28.023641</td>\n",
       "      <td>5336.269739</td>\n",
       "      <td>24.742328</td>\n",
       "      <td>58.25</td>\n",
       "      <td>68.5818</td>\n",
       "      <td>-6.4727</td>\n",
       "      <td>一买</td>\n",
       "      <td>退出</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>109</th>\n",
       "      <td>SZ.300498</td>\n",
       "      <td>2buy</td>\n",
       "      <td>2021-08-24 00:00:00</td>\n",
       "      <td>2022-04-20 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>27.514121</td>\n",
       "      <td>5447.870014</td>\n",
       "      <td>26.209747</td>\n",
       "      <td>61.19</td>\n",
       "      <td>71.7037</td>\n",
       "      <td>-4.4444</td>\n",
       "      <td>二买</td>\n",
       "      <td>退出</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>SZ.300059</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2020-06-01 00:00:00</td>\n",
       "      <td>2020-10-23 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>717.615503</td>\n",
       "      <td>128.855785</td>\n",
       "      <td>652.546740</td>\n",
       "      <td>63.15</td>\n",
       "      <td>91.9041</td>\n",
       "      <td>-2.7850</td>\n",
       "      <td>类三买</td>\n",
       "      <td>线段向上背驰，笔不创新高</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>SH.600436</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-06-01 00:00:00</td>\n",
       "      <td>2020-12-23 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>755.288808</td>\n",
       "      <td>123.580107</td>\n",
       "      <td>716.850684</td>\n",
       "      <td>65.62</td>\n",
       "      <td>98.8735</td>\n",
       "      <td>-1.4944</td>\n",
       "      <td>三买</td>\n",
       "      <td>小转大验证分型</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>SZ.300015</td>\n",
       "      <td>l3buy</td>\n",
       "      <td>2017-08-28 00:00:00</td>\n",
       "      <td>2018-03-29 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>256.450877</td>\n",
       "      <td>384.651913</td>\n",
       "      <td>249.264863</td>\n",
       "      <td>75.18</td>\n",
       "      <td>93.2137</td>\n",
       "      <td>-0.1751</td>\n",
       "      <td>类三买</td>\n",
       "      <td>笔快速上涨，内部macd背驰 macd jd -38.628999066292344 dif...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>88</th>\n",
       "      <td>SH.601899</td>\n",
       "      <td>3buy</td>\n",
       "      <td>2020-07-21 00:00:00</td>\n",
       "      <td>2021-02-24 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>11.260719</td>\n",
       "      <td>10305.345097</td>\n",
       "      <td>10.328934</td>\n",
       "      <td>130.63</td>\n",
       "      <td>164.0845</td>\n",
       "      <td>-4.2254</td>\n",
       "      <td>三买</td>\n",
       "      <td>3买后出现笔背驰 ['bi', 'pz']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73</th>\n",
       "      <td>SZ.000792</td>\n",
       "      <td>down_pz_bc_buy</td>\n",
       "      <td>2020-04-03 00:00:00</td>\n",
       "      <td>2022-04-06 00:00:00</td>\n",
       "      <td>做多</td>\n",
       "      <td>58.406840</td>\n",
       "      <td>1561.774150</td>\n",
       "      <td>51.744226</td>\n",
       "      <td>212.37</td>\n",
       "      <td>386.6738</td>\n",
       "      <td>-6.6098</td>\n",
       "      <td>线段背驰</td>\n",
       "      <td>小转大验证分型</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          code             mmd        open_datetime       close_datetime type  \\\n",
       "48   SZ.300122           l3buy  2021-03-01 00:00:00  2021-03-09 00:00:00   做多   \n",
       "54   SH.601998            3buy  2018-02-05 00:00:00  2018-02-09 00:00:00   做多   \n",
       "72   SZ.000792            3buy  2021-10-15 00:00:00  2021-11-05 00:00:00   做多   \n",
       "44   SZ.002129            3buy  2021-02-22 00:00:00  2021-03-08 00:00:00   做多   \n",
       "51   SZ.000001            3buy  2020-11-18 00:00:00  2020-12-31 00:00:00   做多   \n",
       "43   SZ.002129            3buy  2018-01-24 00:00:00  2018-01-31 00:00:00   做多   \n",
       "86   SH.601390            2buy  2019-12-09 00:00:00  2020-02-03 00:00:00   做多   \n",
       "82   SZ.002371           l3buy  2019-06-21 00:00:00  2019-08-06 00:00:00   做多   \n",
       "36   SZ.002241           l3buy  2017-11-13 00:00:00  2017-11-28 00:00:00   做多   \n",
       "50   SZ.000001           l3buy  2018-02-05 00:00:00  2018-02-07 00:00:00   做多   \n",
       "45   SZ.300122           l3buy  2018-01-02 00:00:00  2018-02-05 00:00:00   做多   \n",
       "42   SZ.002129            3buy  2018-01-04 00:00:00  2018-01-10 00:00:00   做多   \n",
       "102  SH.601601           l3buy  2020-12-31 00:00:00  2021-04-13 00:00:00   做多   \n",
       "55   SZ.002493            3buy  2018-01-24 00:00:00  2018-02-09 00:00:00   做多   \n",
       "52   SH.600031            3buy  2018-01-25 00:00:00  2018-02-07 00:00:00   做多   \n",
       "70   SZ.000792  down_pz_bc_buy  2019-03-20 00:00:00  2019-03-26 00:00:00   做多   \n",
       "28   SH.600028            3buy  2018-01-26 00:00:00  2018-02-08 00:00:00   做多   \n",
       "71   SZ.000792  down_pz_bc_buy  2019-04-01 00:00:00  2019-06-17 00:00:00   做多   \n",
       "104  SH.601816            2buy  2021-04-06 00:00:00  2021-06-22 00:00:00   做多   \n",
       "105  SZ.300498            1buy  2021-05-14 00:00:00  2021-07-19 00:00:00   做多   \n",
       "106  SZ.300498            2buy  2021-06-23 00:00:00  2021-07-19 00:00:00   做多   \n",
       "9    SH.600346            3buy  2017-04-06 00:00:00  2017-04-18 00:00:00   做多   \n",
       "64   SZ.000725            2buy  2018-11-01 00:00:00  2018-12-21 00:00:00   做多   \n",
       "16   SH.601111           l3buy  2017-06-26 00:00:00  2017-07-10 00:00:00   做多   \n",
       "89   SH.601985  down_pz_bc_buy  2020-03-05 00:00:00  2020-03-13 00:00:00   做多   \n",
       "87   SH.601899            3buy  2020-02-06 00:00:00  2020-03-13 00:00:00   做多   \n",
       "23   SH.600436            3buy  2017-11-21 00:00:00  2017-11-24 00:00:00   做多   \n",
       "32   SH.600188            3buy  2017-08-21 00:00:00  2017-10-19 00:00:00   做多   \n",
       "98   SZ.300760           l3buy  2020-11-20 00:00:00  2020-11-25 00:00:00   做多   \n",
       "37   SH.601628            3buy  2017-12-05 00:00:00  2017-12-14 00:00:00   做多   \n",
       "100  SH.600900           l3buy  2020-11-27 00:00:00  2020-12-22 00:00:00   做多   \n",
       "57   SZ.002493            3buy  2020-01-14 00:00:00  2020-01-23 00:00:00   做多   \n",
       "107  SZ.300498            1buy  2021-07-26 00:00:00  2021-07-28 00:00:00   做多   \n",
       "40   SH.601888           l3buy  2017-12-20 00:00:00  2017-12-27 00:00:00   做多   \n",
       "10   SH.600887           l3buy  2017-04-20 00:00:00  2017-05-09 00:00:00   做多   \n",
       "60   SH.600837            1buy  2018-08-28 00:00:00  2018-09-10 00:00:00   做多   \n",
       "67   SZ.000776            2buy  2018-11-13 00:00:00  2018-12-25 00:00:00   做多   \n",
       "17   SH.601111           l3buy  2017-07-18 00:00:00  2017-07-25 00:00:00   做多   \n",
       "79   SH.600690           l3buy  2019-07-25 00:00:00  2019-08-02 00:00:00   做多   \n",
       "90   SZ.002714           l3buy  2020-05-25 00:00:00  2020-06-12 00:00:00   做多   \n",
       "31   SH.600188           l3buy  2017-09-27 00:00:00  2017-10-12 00:00:00   做多   \n",
       "6    SH.600000            3buy  2020-07-20 00:00:00  2020-07-24 00:00:00   做多   \n",
       "66   SZ.000725           l3buy  2021-05-18 00:00:00  2021-05-28 00:00:00   做多   \n",
       "34   SH.600030            3buy  2017-09-18 00:00:00  2017-10-23 00:00:00   做多   \n",
       "20   SH.601111            3buy  2021-04-19 00:00:00  2021-04-22 00:00:00   做多   \n",
       "14   SH.600018            3buy  2017-08-30 00:00:00  2018-06-15 00:00:00   做多   \n",
       "0    SZ.000333            3buy  2017-01-04 00:00:00  2017-01-11 00:00:00   做多   \n",
       "77   SH.600809            3buy  2019-07-29 00:00:00  2019-08-01 00:00:00   做多   \n",
       "63   SH.601818            3buy  2020-01-02 00:00:00  2020-01-10 00:00:00   做多   \n",
       "62   SH.601818           l3buy  2018-11-19 00:00:00  2018-12-18 00:00:00   做多   \n",
       "111  SH.600016            2buy  2022-02-08 00:00:00  2022-03-08 00:00:00   做多   \n",
       "81   SZ.001979           l3buy  2019-06-21 00:00:00  2019-08-02 00:00:00   做多   \n",
       "65   SZ.000725            3buy  2021-02-23 00:00:00  2021-05-28 00:00:00   做多   \n",
       "1    SZ.000333            3buy  2019-07-24 00:00:00  2019-08-05 00:00:00   做多   \n",
       "5    SH.600000           l3buy  2017-01-03 00:00:00  2017-03-22 00:00:00   做多   \n",
       "68   SZ.000776           l3buy  2020-10-29 00:00:00  2020-10-30 00:00:00   做多   \n",
       "76   SH.601398            3buy  2020-01-02 00:00:00  2020-01-16 00:00:00   做多   \n",
       "59   SZ.002493            3buy  2020-08-10 00:00:00  2020-09-24 00:00:00   做多   \n",
       "85   SH.601939           l3buy  2019-12-31 00:00:00  2020-01-21 00:00:00   做多   \n",
       "38   SH.601628            3buy  2017-12-19 00:00:00  2017-12-27 00:00:00   做多   \n",
       "101  SH.601857  down_pz_bc_buy  2021-01-04 00:00:00  2021-01-29 00:00:00   做多   \n",
       "7    SH.600309            3buy  2017-03-27 00:00:00  2017-03-29 00:00:00   做多   \n",
       "110  SH.600016            1buy  2021-11-15 00:00:00  2022-03-08 00:00:00   做多   \n",
       "25   SZ.300015           l3buy  2017-07-21 00:00:00  2017-08-24 00:00:00   做多   \n",
       "22   SH.600436            3buy  2017-05-12 00:00:00  2017-08-04 00:00:00   做多   \n",
       "58   SZ.002493            3buy  2020-07-13 00:00:00  2020-07-27 00:00:00   做多   \n",
       "61   SH.600837            2buy  2018-11-15 00:00:00  2018-12-06 00:00:00   做多   \n",
       "112  SH.600016            1buy  2022-03-23 00:00:00  2022-04-20 00:00:00   做多   \n",
       "74   SZ.002352            1buy  2019-02-14 00:00:00  2019-04-12 00:00:00   做多   \n",
       "56   SZ.002493            3buy  2018-02-26 00:00:00  2018-07-27 00:00:00   做多   \n",
       "99   SH.600900            3buy  2020-11-02 00:00:00  2020-11-16 00:00:00   做多   \n",
       "19   SH.601111            3buy  2021-03-11 00:00:00  2021-03-24 00:00:00   做多   \n",
       "46   SZ.300122            3buy  2020-09-25 00:00:00  2020-12-29 00:00:00   做多   \n",
       "13   SH.600018           l3buy  2017-05-08 00:00:00  2017-06-13 00:00:00   做多   \n",
       "12   SH.600018            3buy  2017-03-27 00:00:00  2017-06-13 00:00:00   做多   \n",
       "41   SH.601888           l3buy  2018-01-03 00:00:00  2018-02-07 00:00:00   做多   \n",
       "39   SH.601888            3buy  2017-11-30 00:00:00  2017-12-14 00:00:00   做多   \n",
       "49   SZ.300122           l3buy  2021-03-12 00:00:00  2021-04-12 00:00:00   做多   \n",
       "2    SZ.002142            3buy  2017-01-03 00:00:00  2017-03-03 00:00:00   做多   \n",
       "78   SH.600809            3buy  2019-12-31 00:00:00  2020-01-21 00:00:00   做多   \n",
       "115  SH.601211            2buy  2018-11-13 00:00:00  2022-04-20 00:00:00   做多   \n",
       "11   SH.600887           l3buy  2017-05-15 00:00:00  2017-06-02 00:00:00   做多   \n",
       "94   SH.601669            1buy  2020-05-06 00:00:00  2020-10-22 00:00:00   做多   \n",
       "114  SH.601211            1buy  2018-10-22 00:00:00  2022-04-20 00:00:00   做多   \n",
       "84   SZ.000858            3buy  2020-12-31 00:00:00  2021-02-22 00:00:00   做多   \n",
       "15   SH.601111           l3buy  2017-05-24 00:00:00  2017-06-13 00:00:00   做多   \n",
       "27   SH.600028            3buy  2017-01-05 00:00:00  2017-08-31 00:00:00   做多   \n",
       "53   SH.600031           l3buy  2019-07-12 00:00:00  2019-08-02 00:00:00   做多   \n",
       "21   SZ.002475            3buy  2017-04-25 00:00:00  2017-06-28 00:00:00   做多   \n",
       "33   SH.600188           l3buy  2021-05-27 00:00:00  2021-06-21 00:00:00   做多   \n",
       "8    SH.600309            3buy  2017-04-05 00:00:00  2017-06-15 00:00:00   做多   \n",
       "30   SH.601318            3buy  2017-07-06 00:00:00  2017-09-04 00:00:00   做多   \n",
       "93   SH.600600            3buy  2020-06-19 00:00:00  2020-08-07 00:00:00   做多   \n",
       "113  SH.600019            3buy  2021-02-08 00:00:00  2022-04-20 00:00:00   做多   \n",
       "83   SZ.000858            3buy  2019-07-29 00:00:00  2020-01-20 00:00:00   做多   \n",
       "69   SZ.000776            3buy  2020-07-29 00:00:00  2020-11-12 00:00:00   做多   \n",
       "47   SZ.300122           l3buy  2021-01-22 00:00:00  2021-02-19 00:00:00   做多   \n",
       "97   SZ.300760           l3buy  2020-09-25 00:00:00  2020-11-06 00:00:00   做多   \n",
       "4    SZ.002142           l3buy  2020-06-24 00:00:00  2020-07-13 00:00:00   做多   \n",
       "75   SH.601398            3buy  2017-06-30 00:00:00  2019-05-31 00:00:00   做多   \n",
       "3    SZ.002142            3buy  2020-05-21 00:00:00  2020-07-13 00:00:00   做多   \n",
       "29   SH.600028            1buy  2020-10-23 00:00:00  2022-04-20 00:00:00   做多   \n",
       "80   SH.600690           l3buy  2020-07-29 00:00:00  2020-09-25 00:00:00   做多   \n",
       "18   SH.601111           l3buy  2017-10-20 00:00:00  2017-11-27 00:00:00   做多   \n",
       "103  SH.600406            3buy  2020-12-22 00:00:00  2021-04-16 00:00:00   做多   \n",
       "91   SZ.002812            3buy  2019-12-31 00:00:00  2020-06-12 00:00:00   做多   \n",
       "92   SZ.002460            3buy  2020-05-08 00:00:00  2020-07-15 00:00:00   做多   \n",
       "35   SH.603288            3buy  2017-04-20 00:00:00  2017-10-25 00:00:00   做多   \n",
       "96   SZ.300059           l3buy  2020-11-06 00:00:00  2021-01-15 00:00:00   做多   \n",
       "108  SZ.300498            1buy  2021-08-09 00:00:00  2022-04-20 00:00:00   做多   \n",
       "109  SZ.300498            2buy  2021-08-24 00:00:00  2022-04-20 00:00:00   做多   \n",
       "95   SZ.300059           l3buy  2020-06-01 00:00:00  2020-10-23 00:00:00   做多   \n",
       "24   SH.600436            3buy  2020-06-01 00:00:00  2020-12-23 00:00:00   做多   \n",
       "26   SZ.300015           l3buy  2017-08-28 00:00:00  2018-03-29 00:00:00   做多   \n",
       "88   SH.601899            3buy  2020-07-21 00:00:00  2021-02-24 00:00:00   做多   \n",
       "73   SZ.000792  down_pz_bc_buy  2020-04-03 00:00:00  2022-04-06 00:00:00   做多   \n",
       "\n",
       "           price        amount   loss_price  profit_rate  max_profit_rate  \\\n",
       "48    783.638367    340.015775   676.841783       -20.55           4.9782   \n",
       "54     11.019615   8671.195446     9.584628       -15.23           1.7199   \n",
       "72    192.655397    780.478111   171.297672       -13.38           8.2741   \n",
       "44    121.468002   1425.864613   106.976342       -13.18           0.4522   \n",
       "51   2214.467452     60.577778  2002.137691       -12.85          13.1094   \n",
       "43     45.386254   2213.893575    41.527164       -12.38           0.0924   \n",
       "86      6.627270  14205.118247     6.441242       -12.28           7.8947   \n",
       "82    318.438394    304.389380   282.160602       -12.07           7.8779   \n",
       "36    511.539706    204.217439   455.449826       -11.71           1.7544   \n",
       "50   1670.921491     56.653073  1553.784726       -11.20           0.0000   \n",
       "45    118.724413    858.897120   112.972341       -10.53          21.8892   \n",
       "42     50.419849   2029.439738    45.931560       -10.15           0.0000   \n",
       "102    51.163853   2542.122559    46.180707        -9.95          22.7604   \n",
       "55     97.960052   1023.321332    86.416372        -9.81           7.5049   \n",
       "52    320.308120    314.682548   297.428968        -9.69           1.8367   \n",
       "70     47.759111   2022.251523    43.898531        -9.39           1.5645   \n",
       "28     15.346164   6599.005206    14.306451        -8.94           4.6070   \n",
       "71     43.898531   2165.602658    41.096497        -8.94          14.8936   \n",
       "104     5.946752  30725.748792     5.493186        -8.64           4.0678   \n",
       "105    28.392229   5198.362147    26.945491        -8.12           5.8740   \n",
       "106    28.352041   5597.725369    27.307175        -7.99           5.8824   \n",
       "9      42.961851   2295.728565    39.783059        -7.96           2.1300   \n",
       "64      9.567335  10335.857008     8.854874        -7.80           5.3192   \n",
       "16     11.010978   9219.958727    10.483506        -7.65           0.1996   \n",
       "89      5.245229  17780.276962     4.891979        -7.14           0.0000   \n",
       "87      8.037298  11585.442029     7.511857        -7.02          17.6755   \n",
       "23    343.585066    304.616991   321.213491        -6.75           1.7305   \n",
       "32     27.015936   3646.951578    25.770670        -6.64          12.8125   \n",
       "98    350.836870    385.960885   334.414331        -6.49           1.8730   \n",
       "37     37.881385   2740.310868    35.798439        -6.37           0.0311   \n",
       "100    55.081553   2297.555027    52.749197        -5.71           1.9202   \n",
       "57    119.866330    780.632995   116.916379        -5.66           0.1641   \n",
       "107    26.556221   5695.632800    25.557561        -5.60           0.0000   \n",
       "40     93.307171   1107.588544    89.584298        -5.46           1.9950   \n",
       "10   1174.483062     83.147426  1121.940399        -5.28           0.2632   \n",
       "60    149.549038    664.391723   142.182934        -5.27           0.2291   \n",
       "67     70.967492   1397.466764    67.454250        -5.26           9.9010   \n",
       "17     10.446793   9643.244203     9.968908        -5.11           0.6383   \n",
       "79    569.292901    171.482141   549.523459        -4.77           0.0589   \n",
       "90    907.351003    101.433804   848.459703        -4.73           4.5417   \n",
       "31     27.796865   3708.128757    26.614918        -4.71           0.9112   \n",
       "6     112.661729   1020.437399   108.945457        -4.62           1.9965   \n",
       "66     22.679719   6538.318169    21.855002        -4.55           2.2727   \n",
       "34     71.650662   1435.193212    68.843890        -4.35           2.0675   \n",
       "20     10.686470  14014.923401     8.911119        -4.29           1.1790   \n",
       "14     84.635169   1168.264725    82.035010        -4.15          35.7911   \n",
       "0     124.563786    796.539589   114.834198        -4.12           0.3352   \n",
       "77    227.622451    432.251786   215.459918        -3.98           1.2353   \n",
       "63      6.355410  15015.843709     6.141183        -3.82           0.6742   \n",
       "62      5.389362  18479.910407     5.211088        -3.56           0.2545   \n",
       "111    88.100824   1638.394716    85.451175        -3.51           0.7519   \n",
       "81     22.801563   4256.704270    22.030081        -3.49           6.0104   \n",
       "65     22.404813   7803.056243    20.033751        -3.37          17.3313   \n",
       "1     240.912641    404.273274   234.684476        -3.33           4.2713   \n",
       "5     116.199244    852.875308   113.989320        -3.19           4.7853   \n",
       "68     89.021914   1687.045693    86.779549        -3.02           0.5038   \n",
       "76     10.605060   8956.585650    10.320838        -2.85           1.3400   \n",
       "59    188.877410    591.088036   155.592858        -2.68          13.4140   \n",
       "85     12.777239   7379.429621    12.459134        -2.63           2.2130   \n",
       "38     37.045853   2785.310282    35.398324        -2.60           2.6048   \n",
       "101     5.834617  22501.592530     5.709291        -2.39           5.0119   \n",
       "7     645.935505    152.797173   561.238253        -2.36           1.1050   \n",
       "110    86.776000   1655.621978    85.230371        -2.04           2.5445   \n",
       "25    254.878937    396.179730   236.127931        -1.72           4.1410   \n",
       "22    279.012010    346.441612   262.564142        -1.54          10.7190   \n",
       "58    163.839479    686.155152   116.148181        -1.39           7.5804   \n",
       "61    164.966465    602.311984   157.600361        -1.25           6.7497   \n",
       "112    82.801526   1701.892923    77.723033        -0.27           4.5333   \n",
       "74    120.191420    802.301572   102.564719         0.00          11.1206   \n",
       "56    110.277609    815.310654    86.416372         0.25           5.0263   \n",
       "99     53.671291   2711.210049    50.498203         0.96           5.2552   \n",
       "19      9.598351  18790.866645     8.911119         1.43          12.4105   \n",
       "46    595.617399    219.130036   480.479306         2.34          19.8472   \n",
       "13     75.761258   1294.448152    72.715579         2.35           7.5377   \n",
       "12     75.634355   1306.458715    70.431320         2.52           7.7181   \n",
       "41     97.736106   1044.976302    88.129383         3.06          18.0166   \n",
       "39     89.199174   1161.942277    81.945991         3.48           7.5798   \n",
       "49    714.673472    254.742648   619.293801         3.87          13.7468   \n",
       "2      25.915438   3820.116797    24.009015         4.31           8.9655   \n",
       "78    296.404949    318.706257   271.093222         5.35           9.6210   \n",
       "115    16.890007   5862.607509    16.162738         5.46          45.0326   \n",
       "11   1158.437580     83.702772  1106.486674         5.90          10.3144   \n",
       "94      4.392338  20800.150797     4.070074         7.01          33.8994   \n",
       "114    16.640347   5935.602011    14.567088         7.04          47.2085   \n",
       "84   4379.197576     32.680343  3791.753392         7.27          22.3882   \n",
       "15     10.263726   9491.724535     9.780210         7.39          14.5610   \n",
       "27     11.437520   8686.613026     9.667191         7.43          11.5412   \n",
       "53    436.836676    222.535499   411.551384         8.19          14.0916   \n",
       "21    269.519260    363.012840   242.445655         8.73          14.5222   \n",
       "33     36.312846   4122.012590    33.075445         8.77          17.0134   \n",
       "8     664.968596    148.121878   561.238253         8.92          14.0608   \n",
       "30    115.098543    890.490764   107.304362         9.46          13.5979   \n",
       "93     98.611568   1027.804365    79.338126        10.29          28.0957   \n",
       "113    14.579966   8809.929907    13.556811        10.45          83.9710   \n",
       "83   1832.190896     53.449478  1720.408745        11.16          15.6364   \n",
       "69     85.779910   1290.031869    81.556731        11.23          21.2939   \n",
       "47    690.912812    254.102957   548.601624        11.28          31.6341   \n",
       "97    334.120710    324.873950   315.197328        13.44          24.0273   \n",
       "4      53.690594   1905.487023    50.791178        16.03          26.8862   \n",
       "75      8.177920  12509.506019     7.757341        16.72          54.8080   \n",
       "3      53.135386   1726.691170    50.626672        17.24          28.2121   \n",
       "29     10.068716   9728.886354     9.838202        17.43          31.3617   \n",
       "80    629.713008    174.091465   566.391867        19.39          35.5556   \n",
       "18      9.868886  10100.077879     9.613273        19.71          30.9685   \n",
       "103   574.427540    207.599889   509.617939        22.56          41.0714   \n",
       "91    176.144000    537.561592   122.080000        22.83          37.0891   \n",
       "92    472.871732    193.568690   342.936792        28.59          40.8944   \n",
       "35    139.008279    701.414279   128.568626        34.59          41.0319   \n",
       "96   1171.237738    105.187356  1080.606246        43.02          56.5079   \n",
       "108    28.023641   5336.269739    24.742328        58.25          68.5818   \n",
       "109    27.514121   5447.870014    26.209747        61.19          71.7037   \n",
       "95    717.615503    128.855785   652.546740        63.15          91.9041   \n",
       "24    755.288808    123.580107   716.850684        65.62          98.8735   \n",
       "26    256.450877    384.651913   249.264863        75.18          93.2137   \n",
       "88     11.260719  10305.345097    10.328934       130.63         164.0845   \n",
       "73     58.406840   1561.774150    51.744226       212.37         386.6738   \n",
       "\n",
       "     max_loss_rate open_msg                                          close_msg  \n",
       "48        -20.9720      类三买                                           l3buy 止损  \n",
       "54        -19.7789       三买                                            3buy 止损  \n",
       "72        -13.7686       三买                                            3buy 止损  \n",
       "44        -13.3913       三买                                            3buy 止损  \n",
       "51        -14.2929       三买                                            3buy 止损  \n",
       "43        -14.8799       三买                                            3buy 止损  \n",
       "86        -12.2807       二买                                            2buy 止损  \n",
       "82        -15.9463      类三买                                           l3buy 止损  \n",
       "36        -16.5351      类三买                                           l3buy 止损  \n",
       "50        -12.3024      类三买                                           l3buy 止损  \n",
       "45        -10.5263      类三买                                           l3buy 止损  \n",
       "42        -10.6489       三买                                            3buy 止损  \n",
       "102       -11.1719      类三买                                           l3buy 止损  \n",
       "55        -12.8374       三买                                       线段向上背驰，笔不创新高  \n",
       "52        -13.1633       三买                                            3buy 止损  \n",
       "70         -9.9087     线段背驰                                  down_pz_bc_buy 止损  \n",
       "28        -10.8401       三买                                            3buy 止损  \n",
       "71         -8.9362     线段背驰                                  down_pz_bc_buy 止损  \n",
       "104        -9.1525       二买                                            2buy 止损  \n",
       "105        -9.9840       一买                                            1buy 止损  \n",
       "106        -9.8564       二买                                            2buy 止损  \n",
       "9          -8.1839       三买                                            3buy 止损  \n",
       "64         -7.8014       二买                                            2buy 止损  \n",
       "16         -7.8490      类三买                                           l3buy 止损  \n",
       "89         -8.7755     线段背驰                                  down_pz_bc_buy 止损  \n",
       "87        -14.0436       三买                                            3buy 止损  \n",
       "23         -7.8897       三买                                            3buy 止损  \n",
       "32         -6.7969       三买                                            3buy 止损  \n",
       "98         -6.4904      类三买                                           l3buy 止损  \n",
       "37         -6.4927       三买                                            3buy 止损  \n",
       "100        -5.8099      类三买                                           l3buy 止损  \n",
       "57         -5.6604       三买                                            3buy 止损  \n",
       "107        -5.9862       一买                                            1buy 止损  \n",
       "40         -5.5492      类三买                                           l3buy 止损  \n",
       "10         -5.7895      类三买                                           l3buy 止损  \n",
       "60         -5.4983       一买                                            1buy 止损  \n",
       "67         -7.7685       二买                                            2buy 止损  \n",
       "17         -5.3191      类三买                                           l3buy 止损  \n",
       "79         -5.3561      类三买                                           l3buy 止损  \n",
       "90         -6.9024      类三买                                            小转大验证分型  \n",
       "31         -7.0615      类三买                                           l3buy 止损  \n",
       "6          -4.8069       三买                                            3buy 止损  \n",
       "66         -5.0000      类三买                                           l3buy 止损  \n",
       "34         -4.5158       三买                                            3buy 止损  \n",
       "20         -4.3944       三买                              3买后出现笔背驰 ['bi', 'pz']  \n",
       "14         -5.0934       三买                                            3buy 止损  \n",
       "0          -4.5256       三买                                       线段向上背驰，笔不创新高  \n",
       "77         -4.1224       三买                                       线段向上背驰，笔不创新高  \n",
       "63         -4.4944       三买                                            3buy 止损  \n",
       "62         -3.5623      类三买                                           l3buy 止损  \n",
       "111        -3.7594       二买                                            2buy 止损  \n",
       "81         -6.4127      类三买                                           l3buy 止损  \n",
       "65        -13.0368       三买                               线段中枢上方出现卖点 ['2sell']  \n",
       "1          -4.3649       三买                                            3buy 止损  \n",
       "5          -3.6810      类三买                                           l3buy 止损  \n",
       "68         -3.1486      类三买                                           l3buy 止损  \n",
       "76         -3.0151       三买                                            3buy 止损  \n",
       "59         -8.6796       三买                                       线段向上背驰，笔不创新高  \n",
       "85         -2.7662      类三买                                           l3buy 止损  \n",
       "38         -3.4308       三买                                       线段向上背驰，笔不创新高  \n",
       "101        -2.6253     线段背驰                                  down_pz_bc_buy 止损  \n",
       "7          -2.8361       三买  笔快速上涨，内部macd背驰 macd jd -22.71522431560135 dif ...  \n",
       "110        -2.2901       一买                                            1buy 止损  \n",
       "25         -3.7004      类三买                                            小转大验证分型  \n",
       "22         -4.8167       三买                                       线段向上背驰，笔不创新高  \n",
       "58        -10.1274       三买  笔快速上涨，内部macd背驰 macd jd -26.62164696115866 dif ...  \n",
       "61         -4.5691       二买                                    线段出现三卖，并且次笔不创新高  \n",
       "112        -0.5333       一买                                                 退出  \n",
       "74         -3.5735       一买                                            小转大验证分型  \n",
       "56        -19.2982       三买                              3买后出现笔背驰 ['bi', 'pz']  \n",
       "99         -0.3537       三买                                       线段向上背驰，笔不创新高  \n",
       "19         -2.0286       三买                              3买后出现笔背驰 ['bi', 'pz']  \n",
       "46        -18.1709       三买                                            小转大验证分型  \n",
       "13         -4.5226      类三买                              3买后出现笔背驰 ['bi', 'pz']  \n",
       "12         -4.3624       三买                              3买后出现笔背驰 ['bi', 'pz']  \n",
       "41         -2.4518      类三买                               线段中枢上方出现卖点 ['1sell']  \n",
       "39         -4.7014       三买                                       线段向上背驰，笔不创新高  \n",
       "49        -11.6600      类三买                               线段中枢上方出现卖点 ['2sell']  \n",
       "2          -3.1034       三买                                    3买后出现笔背驰 ['pz']  \n",
       "78         -4.1249       三买                                       线段向上背驰，笔不创新高  \n",
       "115        -4.3059       二买                                                 退出  \n",
       "11         -0.9377      类三买                                    3买后出现笔背驰 ['pz']  \n",
       "94         -7.6087       一买                                    线段出现三卖，并且次笔不创新高  \n",
       "114        -6.0013       一买                                                 退出  \n",
       "84         -5.7941       三买                               线段中枢上方出现卖点 ['1sell']  \n",
       "15         -0.8565      类三买                                    3买后出现笔背驰 ['pz']  \n",
       "27         -5.3913       三买                                       线段向上背驰，笔不创新高  \n",
       "53         -0.9901      类三买                               线段中枢上方出现卖点 ['1sell']  \n",
       "21         -3.9127       三买  笔快速上涨，内部macd背驰 macd jd -0.5416587694610735 dif...  \n",
       "33         -1.9316      类三买                                    3买后出现笔背驰 ['pz']  \n",
       "8          -6.6190       三买  笔快速上涨，内部macd背驰 macd jd -1.7456289784462509 dif...  \n",
       "30         -2.5714       三买                                    3买后出现笔背驰 ['pz']  \n",
       "93         -2.9872       三买  笔快速上涨，内部macd背驰 macd jd -8.058304856728826 dif ...  \n",
       "113        -4.1916       三买                                                 退出  \n",
       "83         -7.6364       三买                                    3买后出现笔背驰 ['pz']  \n",
       "69         -1.5345       三买                                    3买后出现笔背驰 ['pz']  \n",
       "47         -5.0732      类三买                               线段中枢上方出现卖点 ['1sell']  \n",
       "97         -0.7848      类三买                               线段中枢上方出现卖点 ['2sell']  \n",
       "4          -0.9958      类三买                                    3买后出现笔背驰 ['pz']  \n",
       "75         -1.3333       三买                                       线段向上背驰，笔不创新高  \n",
       "3          -4.4118       三买                                    3买后出现笔背驰 ['pz']  \n",
       "29         -1.0256       一买                                                 退出  \n",
       "80          0.0000      类三买                               线段中枢上方出现卖点 ['2sell']  \n",
       "18         -1.0135      类三买                              3买后出现笔背驰 ['bi', 'pz']  \n",
       "103         0.0000       三买                                            小转大验证分型  \n",
       "91        -17.7228       三买  笔快速上涨，内部macd背驰 macd jd -3.7622103155489826 dif...  \n",
       "92         -6.8090       三买  笔快速上涨，内部macd背驰 macd jd -2.2892046256040803 dif...  \n",
       "35         -5.8233       三买                               线段中枢上方出现卖点 ['1sell']  \n",
       "96         -2.9762      类三买                                    3买后出现笔背驰 ['pz']  \n",
       "108        -6.4727       一买                                                 退出  \n",
       "109        -4.4444       二买                                                 退出  \n",
       "95         -2.7850      类三买                                       线段向上背驰，笔不创新高  \n",
       "24         -1.4944       三买                                            小转大验证分型  \n",
       "26         -0.1751      类三买  笔快速上涨，内部macd背驰 macd jd -38.628999066292344 dif...  \n",
       "88         -4.2254       三买                              3买后出现笔背驰 ['bi', 'pz']  \n",
       "73         -6.6098     线段背驰                                            小转大验证分型  "
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 显示历史持仓\n",
    "#设置显示全部行，不省略\n",
    "pd.set_option('display.max_rows',None)\n",
    "#设置显示全部列，不省略\n",
    "pd.set_option('display.max_columns',None)\n",
    "\n",
    "pos_df = BT.positions()\n",
    "pos_df = pos_df.sort_values(['profit_rate'])\n",
    "pos_codes = pos_df['code'].unique()\n",
    "\n",
    "print(len(pos_df), len(pos_df[pos_df['max_profit_rate'] >= 5]))\n",
    "pos_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "# 展示图表\n",
    "code = pos_codes[1]\n",
    "print(BT.positions(code))\n",
    "BT.show_charts(code, BT.frequencys[0], show_futu='macd')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "# 展示图表\n",
    "BT.show_charts(code, BT.frequencys[1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    },
    "tags": []
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    },
    "tags": []
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    },
    "tags": []
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    },
    "tags": []
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
